diff options
author | Benjamin Otte <otte@redhat.com> | 2015-03-16 15:18:33 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-03-16 15:24:16 +0100 |
commit | a24aee6bb2c03838e58fc2300a159be07557eb7f (patch) | |
tree | 83bd06951fc93d0d668e00ab846d424fa5d8004d /gtk/gtkspinbutton.c | |
parent | 225c10bc5a1dafeccd1e86cd072fb85c172105a2 (diff) | |
download | gtk+-a24aee6bb2c03838e58fc2300a159be07557eb7f.tar.gz |
spinbutton: Fix get_text_area_size for vertical spinbuttons
Commit c5905b13b97012fc9e9424718bdce34e0989f512 changed the semantics of
this vfunc and get_entry_size but I only fixed one of them in the
spinbutton subclass.
https://bugzilla.gnome.org/show_bug.cgi?id=746282
Diffstat (limited to 'gtk/gtkspinbutton.c')
-rw-r--r-- | gtk/gtkspinbutton.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 2d8f98d76a..0c69775a04 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -1863,13 +1863,13 @@ gtk_spin_button_get_text_area_size (GtkEntry *entry, gint up_panel_width, up_panel_height; gint down_panel_width, down_panel_height; - gtk_spin_button_panel_get_size (GTK_SPIN_BUTTON (entry), priv->up_panel, &up_panel_width, &up_panel_height); - gtk_spin_button_panel_get_size (GTK_SPIN_BUTTON (entry), priv->down_panel, &down_panel_width, &down_panel_height); - GTK_ENTRY_CLASS (gtk_spin_button_parent_class)->get_text_area_size (entry, x, y, width, height); if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) { + gtk_spin_button_panel_get_size (GTK_SPIN_BUTTON (entry), priv->up_panel, &up_panel_width, &up_panel_height); + gtk_spin_button_panel_get_size (GTK_SPIN_BUTTON (entry), priv->down_panel, &down_panel_width, &down_panel_height); + if (gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_RTL) { if (x) @@ -1879,14 +1879,6 @@ gtk_spin_button_get_text_area_size (GtkEntry *entry, if (width) *width -= up_panel_width + down_panel_width; } - else - { - if (y) - *y += up_panel_height; - - if (height) - *height -= up_panel_height + down_panel_height; - } } static void |