[gtk+] entry-completion: set size request on the toplevel window
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry-completion: set size request on the toplevel window
- Date: Fri, 4 May 2012 19:43:51 +0000 (UTC)
commit 5a8e2b599568938bdef45ef2c3b7e7634211dc9b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Mar 27 14:23:48 2012 -0400
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 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index dc8d7e5..cd72d28 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]