]> Pileus Git - ~andy/gtk/commitdiff
Fix the positioning of the popup.
authorMatthias Clasen <maclas@gmx.de>
Fri, 30 Jul 2004 06:22:26 +0000 (06:22 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 30 Jul 2004 06:22:26 +0000 (06:22 +0000)
Fri Jul 30 02:21:41 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Fix the positioning of the popup.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentrycompletion.c

index 661e047d92fed4bebea37ba72a76826f92ab5656..618eba713a6f2d4d1e0cf0cb73e017f6d238fca9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 30 02:21:41 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Fix the positioning of the popup. 
+
 Fri Jul 30 00:56:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_active_changed): 
index 661e047d92fed4bebea37ba72a76826f92ab5656..618eba713a6f2d4d1e0cf0cb73e017f6d238fca9 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 30 02:21:41 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Fix the positioning of the popup. 
+
 Fri Jul 30 00:56:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_active_changed): 
index 661e047d92fed4bebea37ba72a76826f92ab5656..618eba713a6f2d4d1e0cf0cb73e017f6d238fca9 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 30 02:21:41 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Fix the positioning of the popup. 
+
 Fri Jul 30 00:56:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_active_changed): 
index 661e047d92fed4bebea37ba72a76826f92ab5656..618eba713a6f2d4d1e0cf0cb73e017f6d238fca9 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jul 30 02:21:41 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Fix the positioning of the popup. 
+
 Fri Jul 30 00:56:31 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_active_changed): 
index c093acfb9c96f2be810311ca27a60ffa76479e80..f36d5109255594dfdcb4491f8be73dc16c1466f1 100644 (file)
@@ -1267,6 +1267,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
   gint monitor_num;
   GdkRectangle monitor;
   GtkRequisition popup_req;
+  GtkRequisition entry_req;
   GtkTreePath *path;
   gboolean above;
   gint width;
@@ -1318,15 +1319,16 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
     gtk_widget_hide (completion->priv->action_view);
 
   gtk_widget_size_request (completion->priv->popup_window, &popup_req);
+  gtk_widget_size_request (completion->priv->entry, &entry_req);
   
   if (x < monitor.x)
     x = monitor.x;
   else if (x + popup_req.width > monitor.x + monitor.width)
     x = monitor.x + monitor.width - popup_req.width;
   
-  if (y + height + popup_req.height <= monitor.y + monitor.height)
+  if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height)
     {
-      y += height;
+      y += entry_req.height;
       above = FALSE;
     }
   else