diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-27 14:23:48 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-05-04 15:43:29 -0400 |
commit | 5a8e2b599568938bdef45ef2c3b7e7634211dc9b (patch) | |
tree | a86e6442727b037556132981263727e510cfc1e9 /gtk/gtkentrycompletion.c | |
parent | 644070b55179f7fa72b386e60d229646f93ad9a4 (diff) | |
download | gtk+-5a8e2b599568938bdef45ef2c3b7e7634211dc9b.tar.gz |
entry-completion: set size request on the toplevel window
Instead of setting it on the child scrolled window. This is needed
because the whole window's allocation must be equal to the one of the
entry (in case the popup-set-width property is TRUE); if we set the size
request on a children of the window, there might be other children with
borders/paddings in between the toplevel and the child we set the size
request too, which will break alignment.
https://bugzilla.gnome.org/show_bug.cgi?id=672947
Diffstat (limited to 'gtk/gtkentrycompletion.c')
-rw-r--r-- | gtk/gtkentrycompletion.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index dc8d7e538f..cd72d28bbe 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1535,14 +1535,11 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) gtk_tree_view_columns_autosize (GTK_TREE_VIEW (completion->priv->tree_view)); gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (completion->priv->scrolled_window), width); - gtk_widget_set_size_request (completion->priv->scrolled_window, width, -1); + gtk_widget_set_size_request (completion->priv->popup_window, width, -1); gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (completion->priv->scrolled_window), items * height); if (actions) - { - gtk_widget_show (completion->priv->action_view); - gtk_widget_set_size_request (completion->priv->action_view, width, -1); - } + gtk_widget_show (completion->priv->action_view); else gtk_widget_hide (completion->priv->action_view); |