[gtk+] range: don't draw origin when the slider is invisible
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] range: don't draw origin when the slider is invisible
- Date: Wed, 27 Feb 2013 22:31:13 +0000 (UTC)
commit d434a9103c0fe2606b8aeeb1c629db9e9d1adbe6
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 27 17:18:28 2013 -0500
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.
gtk/gtkrange.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index d627566..8339e52 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]