summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-03-09 14:15:40 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-03-09 14:15:40 -0500
commitfa48dbf1a58c01f06218accd3ec0c1b5ffceca02 (patch)
tree48b98a8eac5e62089bca6c33bd515f573b4ef4dd /gtk/gtkrange.c
parentaaa467679d8ea592856a6a472584ba4988f68dcc (diff)
downloadgtk+-fa48dbf1a58c01f06218accd3ec0c1b5ffceca02.tar.gz
range: Fix gadget state propagation
The contents node was not getting state updates at all, and the trough node was missing some state updates as well, because we were not calling update_trough_state() in all the places where it is needed.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r--gtk/gtkrange.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index c85c20337a..b9fada2dc7 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2302,6 +2302,8 @@ update_trough_state (GtkRange *range)
state &= ~(GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE);
+ gtk_css_gadget_set_state (priv->contents_gadget, state);
+
if (priv->mouse_location == MOUSE_TROUGH && !(state & GTK_STATE_FLAG_INSENSITIVE))
state |= GTK_STATE_FLAG_PRELIGHT;
@@ -2418,6 +2420,7 @@ range_grab_add (GtkRange *range,
priv->grab_location = location;
gtk_range_queue_allocate_location (range, location);
+ update_trough_state (range);
update_slider_state (range);
update_steppers_state (range);
@@ -3473,6 +3476,7 @@ gtk_range_update_mouse_location (GtkRange *range)
else
gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
+ update_trough_state (range);
update_slider_state (range);
update_steppers_state (range);
}