Commit 460dfabb authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Restrict the width of the popup to be no larger than the monitor.

2004-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
	Restrict the width of the popup to be no larger than the
	monitor.  (#142678, DmD Ljungmark)
parent f2801c7e
2004-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Restrict the width of the popup to be no larger than the
monitor. (#142678, DmD Ljungmark)
* gtk/gtkbutton.c: Go back to the initial fix for the
focus-overdrawing problem, which was actually correct
according to docs/widget_geometry.txt.
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
arrow size from 11 to 15 to compensate for that.
* gtk/gtktextview.c (gtk_text_view_class_init): Document the
arguments of the ::move-cursor signal. (#142725)
......
2004-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Restrict the width of the popup to be no larger than the
monitor. (#142678, DmD Ljungmark)
* gtk/gtkbutton.c: Go back to the initial fix for the
focus-overdrawing problem, which was actually correct
according to docs/widget_geometry.txt.
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
arrow size from 11 to 15 to compensate for that.
* gtk/gtktextview.c (gtk_text_view_class_init): Document the
arguments of the ::move-cursor signal. (#142725)
......
2004-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Restrict the width of the popup to be no larger than the
monitor. (#142678, DmD Ljungmark)
* gtk/gtkbutton.c: Go back to the initial fix for the
focus-overdrawing problem, which was actually correct
according to docs/widget_geometry.txt.
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
arrow size from 11 to 15 to compensate for that.
* gtk/gtktextview.c (gtk_text_view_class_init): Document the
arguments of the ::move-cursor signal. (#142725)
......
2004-05-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Restrict the width of the popup to be no larger than the
monitor. (#142678, DmD Ljungmark)
* gtk/gtkbutton.c: Go back to the initial fix for the
focus-overdrawing problem, which was actually correct
according to docs/widget_geometry.txt.
* gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial
arrow size from 11 to 15 to compensate for that.
* gtk/gtktextview.c (gtk_text_view_class_init): Document the
arguments of the ::move-cursor signal. (#142725)
......
......@@ -1091,7 +1091,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
GtkRequisition popup_req;
GtkTreePath *path;
gboolean above;
gint width;
gdk_window_get_origin (completion->priv->entry->window, &x, &y);
get_borders (GTK_ENTRY (completion->priv->entry), &x_border, &y_border);
......@@ -1110,9 +1111,14 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
else
gtk_widget_show (completion->priv->scrolled_window);
screen = gtk_widget_get_screen (GTK_WIDGET (completion->priv->entry));
monitor_num = gdk_screen_get_monitor_at_window (screen,
GTK_WIDGET (completion->priv->entry)->window);
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
width = MIN (completion->priv->entry->allocation.width, monitor.width);
gtk_widget_set_size_request (completion->priv->tree_view,
completion->priv->entry->allocation.width - 2 * x_border,
items * height);
width - 2 * x_border, items * height);
/* default on no match */
completion->priv->current_selected = -1;
......@@ -1128,18 +1134,12 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
&height);
gtk_widget_set_size_request (completion->priv->action_view,
completion->priv->entry->allocation.width - 2 * x_border,
items * height);
width - 2 * x_border, items * height);
}
else
gtk_widget_hide (completion->priv->action_view);
gtk_widget_size_request (completion->priv->popup_window, &popup_req);
screen = gtk_widget_get_screen (GTK_WIDGET (completion->priv->entry));
monitor_num = gdk_screen_get_monitor_at_window (screen,
GTK_WIDGET (completion->priv->entry)->window);
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
if (x < monitor.x)
x = monitor.x;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment