Commit 03fdaca1 authored by Cosimo Cecchi's avatar Cosimo Cecchi

color-swatch: set/unset prelight state flag on enter/leave events

Allows themes to set a different style on prelight.
parent f4b15a58
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment