]> Pileus Git - ~andy/gtk/commitdiff
combobox: allocate the right border to the arrow and not to the label
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 6 Apr 2011 02:36:24 +0000 (22:36 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Apr 2011 21:14:34 +0000 (17:14 -0400)
When the combobox is in menu mode, the right padding of the togglebutton
inside, should be allocated to its rightmost children, which is the
arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=646882

gtk/gtkcombobox.c

index bcd169b8aac83cba48eb2613472433d3e9767354..dcf9af52ab02a11436ab154c9da9bc8b1868eb32 100644 (file)
@@ -2449,7 +2449,7 @@ gtk_combo_box_size_allocate (GtkWidget     *widget,
           gtk_widget_get_preferred_size (priv->arrow, &req, NULL);
           child.width = req.width;
           if (!is_rtl)
-            child.x += width - req.width;
+            child.x += width - req.width - button_padding.right;
           child.width = MAX (1, child.width);
           child.height = MAX (1, child.height);
           gtk_widget_size_allocate (priv->arrow, &child);
@@ -2467,7 +2467,7 @@ gtk_combo_box_size_allocate (GtkWidget     *widget,
             {
               child.x += req.width;
               child.width = allocation->x + allocation->width
-                - (border_width + button_border.right + focus_width + focus_pad)
+                - (border_width + focus_width + focus_pad)
                 - child.x;
             }
           else