app: show popup menus at the same height as their corresponding button

In gimp_button_menu_position(), position the menu at the same
height as the button, instead of half-way down.  This is mostly a
stylistic choice, but it works much better for tool-button menus,
added in the next commit.
This commit is contained in:
Ell
2020-01-29 21:50:42 +02:00
parent 0bd3c2e18e
commit d916e3ca21

View File

@ -208,10 +208,8 @@ gimp_button_menu_position (GtkWidget *button,
break;
}
*y += button_allocation.height / 2;
if (*y + menu_requisition.height > rect.y + rect.height)
*y -= menu_requisition.height;
*y -= menu_requisition.height - button_allocation.height;
if (*y < rect.y)
*y = rect.y;