Pop below the entry if there's more free space below the entry than above.

* 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)
This commit is contained in:
Matthias Clasen
2005-09-27 04:48:53 +00:00
parent e9465843db
commit aa79f94ac7
3 changed files with 14 additions and 1 deletions

View 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;