]> Pileus Git - ~andy/gtk/commitdiff
Pop below the entry if there's more free space below the entry than above.
authorMatthias Clasen <matthiasc@src.gnome.org>
Tue, 27 Sep 2005 04:48:53 +0000 (04:48 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 27 Sep 2005 04:48:53 +0000 (04:48 +0000)
        * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
        Pop below the entry if there's more free space below the entry
        than above.  (#316948, Tommi Komulainen)

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

index 0623a0b7de9a40acacaab1857ecd878c869d2095..4173cee3d23699b3c31ae3b723d888afc39f2ae3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+       Pop below the entry if there's more free space below the entry
+       than above.  (#316948, Tommi Komulainen)
+
 2005-09-26  Federico Mena Quintero  <federico@ximian.com>
 
        Do not create the save mode-specific widgets in the open modes, so
index 0623a0b7de9a40acacaab1857ecd878c869d2095..4173cee3d23699b3c31ae3b723d888afc39f2ae3 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
+       Pop below the entry if there's more free space below the entry
+       than above.  (#316948, Tommi Komulainen)
+
 2005-09-26  Federico Mena Quintero  <federico@ximian.com>
 
        Do not create the save mode-specific widgets in the open modes, so
index 2c327153ae8cf5eaa3cab0fe5eb32c1c3e8465c9..92a850185e975a011c905426eca4b365da4ae191 100644 (file)
@@ -1387,7 +1387,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
   else if (x + popup_req.width > monitor.x + monitor.width)
     x = monitor.x + monitor.width - popup_req.width;
   
-  if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height)
+  if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height ||
+      y - monitor.y < (monitor.y + monitor.height) - (y + entry_req.height))
     {
       y += entry_req.height;
       above = FALSE;