diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2016-02-28 10:00:15 -0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2016-02-29 10:45:14 -0800 |
commit | 0c8dbf07ce8b1341446c6f4a2cae0e7c63d2e614 (patch) | |
tree | 9020c57e608b327e3677149384b83548802d51df /gtk/gtkrange.c | |
parent | cdd7a7bdcd29109985d3846324ef52c19ed3f70b (diff) | |
download | gtk+-0c8dbf07ce8b1341446c6f4a2cae0e7c63d2e614.tar.gz |
range: draw slider on top of all contents
This is so that e.g. the focus ring is drawn under the slider.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index e8f04d50bb..b665ec299b 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -2297,8 +2297,6 @@ gtk_range_render_trough (GtkCssGadget *gadget, if (priv->has_origin) gtk_css_gadget_draw (priv->highlight_gadget, cr); - gtk_css_gadget_draw (priv->slider_gadget, cr); - 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 * GtkColorScale wants to omit the trough but still draw the slider... */ - if (GTK_IS_COLOR_SCALE (widget)) - { - gtk_css_gadget_draw (priv->slider_gadget, cr); - return FALSE; - } + if (!GTK_IS_COLOR_SCALE (widget)) + gtk_css_gadget_draw (priv->contents_gadget, cr); - 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; } |