Commit 5108a27e authored by Lapo Calamandrei's avatar Lapo Calamandrei
Browse files

gtkrange: consider css margin on the slider

Css margin now works on the slider as they do on the trough.
The margin is not considered in the space allocation as it is for
the trough, so the slider width will be the set slider-width -
margins. Spefifying margins on the main widget in the css will
clearly affect both the trough and the slider, so theme changes are
parent e14cf55b
......@@ -2210,13 +2210,14 @@ gtk_range_draw (GtkWidget *widget,
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
gtk_style_context_get_margin (context, widget_state, &margin);
gtk_style_context_set_state (context, state);
gtk_render_slider (context, cr,
priv->slider.x + margin.left,
priv->slider.y +,
priv->slider.width - margin.left - margin.right,
priv->slider.height - - margin.bottom,
gtk_style_context_restore (context);
Supports Markdown
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