From 5a8e2b599568938bdef45ef2c3b7e7634211dc9b Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 27 Mar 2012 14:23:48 -0400 Subject: [PATCH] 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 --- gtk/gtkentrycompletion.c | 7 ++----- 1 file 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);