diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-02-21 18:13:58 +0100 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-02-21 18:17:26 +0100 |
commit | 03fdaca1870cb1b436cb69b174028d66fe6b7078 (patch) | |
tree | 0529f6270f1dd42a5ad7ccfc5d33ac09950528d9 | |
parent | f4b15a58db797d70195f12266a9b678e8860d6e2 (diff) | |
download | gtk+-03fdaca1870cb1b436cb69b174028d66fe6b7078.tar.gz |
color-swatch: set/unset prelight state flag on enter/leave events
Allows themes to set a different style on prelight.
-rw-r--r-- | gtk/gtkcolorswatch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index d6fa41ea53..8655dc5c53 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -375,6 +375,8 @@ swatch_enter_notify (GtkWidget *widget, { GtkColorSwatch *swatch = GTK_COLOR_SWATCH (widget); swatch->priv->contains_pointer = TRUE; + gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE); + return FALSE; } @@ -384,6 +386,8 @@ swatch_leave_notify (GtkWidget *widget, { GtkColorSwatch *swatch = GTK_COLOR_SWATCH (widget); swatch->priv->contains_pointer = FALSE; + gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT); + return FALSE; } |