[gtk+] spinbutton: Fix get_text_area_size for vertical spinbuttons



commit a24aee6bb2c03838e58fc2300a159be07557eb7f
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 16 15:18:33 2015 +0100

    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 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 2d8f98d..0c69775 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]