range: draw slider on top of all contents

This is so that e.g. the focus ring is drawn under the slider.
This commit is contained in:
Cosimo Cecchi
2016-02-28 10:00:15 -08:00
parent cdd7a7bdcd
commit 0c8dbf07ce

View File

@ -2297,8 +2297,6 @@ gtk_range_render_trough (GtkCssGadget *gadget,
if (priv->has_origin) if (priv->has_origin)
gtk_css_gadget_draw (priv->highlight_gadget, cr); gtk_css_gadget_draw (priv->highlight_gadget, cr);
gtk_css_gadget_draw (priv->slider_gadget, cr);
return gtk_widget_has_visible_focus (widget); return gtk_widget_has_visible_focus (widget);
} }
@ -2318,13 +2316,11 @@ gtk_range_render (GtkCssGadget *gadget,
/* HACK: we can't render the contents box directly because /* HACK: we can't render the contents box directly because
* GtkColorScale wants to omit the trough but still draw the slider... * GtkColorScale wants to omit the trough but still draw the slider...
*/ */
if (GTK_IS_COLOR_SCALE (widget)) if (!GTK_IS_COLOR_SCALE (widget))
{ gtk_css_gadget_draw (priv->contents_gadget, cr);
gtk_css_gadget_draw (priv->slider_gadget, cr);
return FALSE;
}
gtk_css_gadget_draw (priv->contents_gadget, cr); /* Draw the slider last, so that e.g. the focus ring stays below it */
gtk_css_gadget_draw (priv->slider_gadget, cr);
return FALSE; return FALSE;
} }