diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-01-31 15:34:00 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-01-31 20:30:41 -0500 |
commit | 821365af15d6669cde9bd3cf68ed98d5bfcb652c (patch) | |
tree | d447d8e946950f41968efbdeb3084d8a1d77751a /gtk/gtkcombobox.c | |
parent | 93523e70a080bfe4bb39255ae78d590276b99a13 (diff) | |
download | gtk+-821365af15d6669cde9bd3cf68ed98d5bfcb652c.tar.gz |
combobox: move the allocation of the button contents box directly
If we're in menu mode with no children, instead of tweaking the
allocation of the arrow and the separator separately, tweak the
allocation of the box that contain both.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r-- | gtk/gtkcombobox.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index b10997dbcb..d79e238c6f 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2585,22 +2585,13 @@ gtk_combo_box_size_allocate (GtkWidget *widget, } /* handle the children */ - gtk_widget_get_preferred_size (priv->arrow, &req, NULL); + gtk_widget_get_preferred_size (priv->box, &req, NULL); child.width = req.width; if (!is_rtl) - child.x += width - req.width - button_padding.right; + child.x += width - req.width; child.width = MAX (1, child.width); child.height = MAX (1, child.height); - gtk_widget_size_allocate (priv->arrow, &child); - if (is_rtl) - child.x += req.width; - gtk_widget_get_preferred_size (priv->separator, &req, NULL); - child.width = req.width; - if (!is_rtl) - child.x -= req.width; - child.width = MAX (1, child.width); - child.height = MAX (1, child.height); - gtk_widget_size_allocate (priv->separator, &child); + gtk_widget_size_allocate (priv->box, &child); if (is_rtl) { |