]> Pileus Git - ~andy/gtk/commitdiff
range: don't draw origin when the slider is invisible
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 27 Feb 2013 22:18:28 +0000 (17:18 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 27 Feb 2013 22:20:59 +0000 (17:20 -0500)
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.

gtk/gtkrange.c

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