From 0a48e51a0d027d626a25fe56a56c497e77ee58d7 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 13 Dec 2011 08:55:11 +0100 Subject: [PATCH] Don't propagate prelight and active states to row children --- src/contacts-contact-pane.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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++); }