Commit c310c35a authored by Cosimo Cecchi's avatar Cosimo Cecchi

switch: propagate the active state to the slider

parent 0ff4fdb2
......@@ -473,11 +473,15 @@ gtk_switch_paint_handle (GtkWidget *widget,
cairo_t *cr,
GdkRectangle *box)
{
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStateFlags state;
state = gtk_widget_get_state_flags (widget);
if (priv->is_active)
state |= GTK_STATE_FLAG_ACTIVE;
gtk_style_context_save (context);
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
......
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