[ease] Use the opposite of text color for highlight color.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] Use the opposite of text color for highlight color.
- Date: Fri, 11 Jun 2010 05:59:04 +0000 (UTC)
commit 7de4d912a450342fe72c7ff00b88af79ffba0e9e
Author: Nate Stedman <natesm gmail com>
Date: Fri Jun 11 01:58:44 2010 -0400
Use the opposite of text color for highlight color.
src/TextActor.vala | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/TextActor.vala b/src/TextActor.vala
index 36cc4c5..71dd7eb 100644
--- a/src/TextActor.vala
+++ b/src/TextActor.vala
@@ -22,7 +22,15 @@
*/
public class Ease.TextActor : Actor
{
+ /**
+ * The text shown for unedited Elements.
+ */
private const string DEFAULT_TEXT = _("Double Click to Edit");
+
+ /**
+ * The opacity of the selection highlight.
+ */
+ private const uchar SELECTION_ALPHA = 200;
/**
* Instantiates a new TextActor from an Element.
@@ -70,8 +78,14 @@ public class Ease.TextActor : Actor
text.activate.connect(text_activate);
// grab key focus
- ((Clutter.Stage)get_stage()).set_key_focus(text);
sender.key_focus();
+ ((Clutter.Stage)get_stage()).set_key_focus(text);
+
+ // set the selection color
+ text.selection_color = { 255 - text.color.red,
+ 255 - text.color.green,
+ 255 - text.color.blue,
+ SELECTION_ALPHA };
// if the element hasn't been edited, empty it
if (!element.has_been_edited)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]