spinbutton: Fix get_text_area_size for vertical spinbuttons

Commit c5905b13b9 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
This commit is contained in:
Benjamin Otte 2015-03-16 15:18:33 +01:00
parent 225c10bc5a
commit a24aee6bb2

View File

@ -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