From a24aee6bb2c03838e58fc2300a159be07557eb7f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 16 Mar 2015 15:18:33 +0100 Subject: [PATCH] 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 --- gtk/gtkspinbutton.c | 14 +++----------- 1 file 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