[gnome-contacts/new-design] Don't propagate prelight and active states to row children
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/new-design] Don't propagate prelight and active states to row children
- Date: Thu, 15 Dec 2011 09:37:15 +0000 (UTC)
commit 0a48e51a0d027d626a25fe56a56c497e77ee58d7
Author: Alexander Larsson <alexl redhat com>
Date: Tue Dec 13 08:55:11 2011 +0100
Don't propagate prelight and active states to row children
src/contacts-contact-pane.vala | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index de92f09..d407c94 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -437,6 +437,18 @@ public class Contacts.FieldRow : Contacts.Row {
clickable.unrealize (null);
}
+ public override bool draw (Cairo.Context cr) {
+ var state = this.get_state_flags ();
+ var context = this.get_style_context ();
+ context.save ();
+ // Don't propagate the clicked prelight and active state to children
+ this.set_state_flags (state & ~(StateFlags.PRELIGHT | StateFlags.ACTIVE), true);
+ base.draw (cr);
+ context.restore ();
+
+ return true;
+ }
+
public void pack (Widget w) {
this.attach (w, 1, start++);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]