summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-30 15:46:01 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-30 15:46:01 +0200
commit09daf335df3b10c67e882234b2f1b11ff097afaf (patch)
treefabe4e574f712d22c01c6f719b77ae23659db75a
parentd58ecc5cb293a7e5248beae95727d1301d1c907b (diff)
Placement of popup menus at bottom of window
Don't do a selection highlight if the menu is at the bottom of the window, that would be too much scrolling.
-rw-r--r--src/ui/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index fe5e5393..cfb2b230 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1036,7 +1036,8 @@ void openMenuFlags_Widget(iWidget *d, iInt2 windowCoord, int menuOpenFlags) {
1036 setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse); 1036 setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse);
1037 arrange_Widget(d); /* need to know the height */ 1037 arrange_Widget(d); /* need to know the height */
1038 iBool allowOverflow = iFalse; 1038 iBool allowOverflow = iFalse;
1039 /* A vertical offset determined by a possible selected label in the menu. */ { 1039 /* A vertical offset determined by a possible selected label in the menu. */
1040 if (windowCoord.y < rootSize.y - lineHeight_Text(uiNormal_FontSize) * 3) {
1040 iConstForEach(ObjectList, child, children_Widget(d)) { 1041 iConstForEach(ObjectList, child, children_Widget(d)) {
1041 const iWidget *item = constAs_Widget(child.object); 1042 const iWidget *item = constAs_Widget(child.object);
1042 if (flags_Widget(item) & selected_WidgetFlag) { 1043 if (flags_Widget(item) & selected_WidgetFlag) {