Fix the positioning of the popup.
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.
This commit is contained in:
committed by
Matthias Clasen
parent
3c1da10415
commit
f911da5e90
@@ -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.
|
||||
|
||||
2004-07-28 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
@@ -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.
|
||||
|
||||
2004-07-28 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
@@ -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.
|
||||
|
||||
2004-07-28 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
@@ -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.
|
||||
|
||||
2004-07-28 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
@@ -1147,6 +1147,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;
|
||||
@@ -1198,15 +1199,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
|
||||
|
||||
Reference in New Issue
Block a user