diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 270fbec7c8..1dab98c59f 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -2991,44 +2991,46 @@ get_arrows_visible_area (GtkMenu *menu, border_width = gtk_container_get_border_width (GTK_CONTAINER (widget)); border->x = border_width + menu_padding.left; border->y = border_width + menu_padding.top; - border->width = gdk_window_get_width (gtk_widget_get_window (widget)); - border->height = gdk_window_get_height (gtk_widget_get_window (widget)); + border->width = gdk_window_get_width (gtk_widget_get_window (widget)) + - 2 * border_width - menu_padding.left - menu_padding.right; + border->height = gdk_window_get_height (gtk_widget_get_window (widget)) + - 2 * border_width - menu_padding.top - menu_padding.bottom; switch (arrow_placement) { case GTK_ARROWS_BOTH: upper->x = border->x; upper->y = border->y; - upper->width = border->width - 2 * border->x; + upper->width = border->width; upper->height = scroll_arrow_height; lower->x = border->x; lower->y = border->height - border->y - scroll_arrow_height; - lower->width = border->width - 2 * border->x; + lower->width = border->width; lower->height = scroll_arrow_height; break; case GTK_ARROWS_START: upper->x = border->x; upper->y = border->y; - upper->width = (border->width - 2 * border->x) / 2; + upper->width = border->width / 2; upper->height = scroll_arrow_height; lower->x = border->x + upper->width; lower->y = border->y; - lower->width = (border->width - 2 * border->x) / 2; + lower->width = border->width - upper->width; lower->height = scroll_arrow_height; break; case GTK_ARROWS_END: upper->x = border->x; - upper->y = border->height - border->y - scroll_arrow_height; - upper->width = (border->width - 2 * border->x) / 2; + upper->y = border->height - scroll_arrow_height; + upper->width = border->width / 2; upper->height = scroll_arrow_height; lower->x = border->x + upper->width; - lower->y = border->height - border->y - scroll_arrow_height; - lower->width = (border->width - 2 * border->x) / 2; + lower->y = border->height - scroll_arrow_height; + lower->width = border->width - upper->width; lower->height = scroll_arrow_height; break; @@ -3038,7 +3040,7 @@ get_arrows_visible_area (GtkMenu *menu, lower->x = lower->y = lower->width = lower->height = 0; } - *arrow_space = scroll_arrow_height - menu_padding.top - menu_padding.bottom; + *arrow_space = scroll_arrow_height; } static gboolean