diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-05-04 20:33:21 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-05-04 20:33:21 -0400 |
commit | 8a4528eb2a04d9249c01375a8b31c12cd9be16f8 (patch) | |
tree | 0b1eeb2f40fb6a676a49578ac54c5712c1f22932 /gtk/gtkscale.c | |
parent | a141c3527165c5245aa6c4c57f73c8b9e125c223 (diff) | |
download | gtk+-8a4528eb2a04d9249c01375a8b31c12cd9be16f8.tar.gz |
Fix a problem with marks on vertical scales
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r-- | gtk/gtkscale.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 9e92d9cbd3..6b7da98469 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -946,7 +946,10 @@ find_next_pos (GtkWidget *widget, return marks[i]; } - return widget->allocation.width; + if (pos == GTK_POS_TOP || pos == GTK_POS_BOTTOM) + return widget->allocation.width; + else + return widget->allocation.height; } static gboolean @@ -1074,7 +1077,7 @@ gtk_scale_expose (GtkWidget *widget, { pango_layout_set_markup (layout, mark->markup, -1); pango_layout_get_pixel_extents (layout, NULL, &logical_rect); - + y3 = y1 - logical_rect.height / 2; if (y3 < min_pos) y3 = min_pos; |