]> Pileus Git - ~andy/gtk/commitdiff
combobox: make sure to respect the GtkComboBox padding in menu mode
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 31 Jan 2012 23:33:37 +0000 (18:33 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 1 Feb 2012 01:30:42 +0000 (20:30 -0500)
When the combobox is in menu mode, we still shouldn't discard the
GtkComboBox padding value; it's wrong to allocate it to the button.

gtk/gtkcombobox.c

index bd7942fe130e0dde8d54f05d2af700e4b0d158ee..bb6d8c4a76396d6169c28b6c30ebd707bdadc07e 100644 (file)
@@ -2560,7 +2560,6 @@ gtk_combo_box_size_allocate (GtkWidget     *widget,
           gint width;
           guint border_width;
 
-          gtk_widget_size_allocate (priv->button, allocation);
 
           /* menu mode */
           allocation->x += padding.left;
@@ -2571,6 +2570,7 @@ gtk_combo_box_size_allocate (GtkWidget     *widget,
           /* set some things ready */
           border_width = gtk_container_get_border_width (GTK_CONTAINER (priv->button));
           get_widget_padding_and_border (priv->button, &button_padding);
+          gtk_widget_size_allocate (priv->button, allocation);
 
           child.x = allocation->x;
           child.y = allocation->y;