Commit a9d26e14 authored by Soeren Sandmann's avatar Soeren Sandmann Committed by Søren Sandmann Pedersen

Take arrows into account when clamping the offset. Fixes #95758.

Thu Oct 17 22:09:05 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
	account when clamping the offset. Fixes #95758.
parent 79193611
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for
......
......@@ -2538,12 +2538,6 @@ gtk_menu_scroll_to (GtkMenu *menu,
view_height -= (border_width + widget->style->ythickness) * 2;
menu_height = widget->requisition.height - (border_width + widget->style->ythickness) * 2;
offset = CLAMP (offset, 0, menu_height - view_height);
/* Scroll the menu: */
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move (menu->bin_window, 0, -offset);
x = border_width + widget->style->xthickness;
y = border_width + widget->style->ythickness;
......@@ -2585,6 +2579,12 @@ gtk_menu_scroll_to (GtkMenu *menu,
y += MENU_SCROLL_ARROW_HEIGHT;
}
offset = CLAMP (offset, 0, menu_height - view_height);
/* Scroll the menu: */
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move (menu->bin_window, 0, -offset);
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move_resize (menu->view_window,
x,
......
Markdown is supported
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