range: don't draw origin when the slider is invisible

When the range of the GtkRange is zero (i.e. the upper and lower bounds
of the adjustment have the same value), don't use an origin to draw the
trough, as the slider will also be hidden, and the juncture between the
two sections of the trough will be visible.
This commit is contained in:
Cosimo Cecchi 2013-02-27 17:18:28 -05:00
parent bbfc8f9a9b
commit d434a9103c

View File

@ -2117,7 +2117,7 @@ gtk_range_draw (GtkWidget *widget,
if (draw_trough) if (draw_trough)
{ {
if (!priv->has_origin) if (!priv->has_origin || !draw_slider)
{ {
gtk_render_background (context, cr, gtk_render_background (context, cr,
x, y, width, height); x, y, width, height);