mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
color-swatch: set/unset prelight state flag on enter/leave events
Allows themes to set a different style on prelight.
This commit is contained in:
parent
f4b15a58db
commit
03fdaca187
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user