Don't propagate prelight and active states to row children

This commit is contained in:
Alexander Larsson 2011-12-13 08:55:11 +01:00
parent a5ba512376
commit 0a48e51a0d

View file

@ -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++);
}