From bfd440d6f26c1b0e4ed714b49c57b6814f42d8e5 Mon Sep 17 00:00:00 2001 From: tomasklaen Date: Fri, 30 Aug 2024 13:22:31 +0200 Subject: [PATCH] tweak: display menu actions outside only if there's item hint or icon --- src/uosc/elements/Menu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uosc/elements/Menu.lua b/src/uosc/elements/Menu.lua index 3474a9aa..f503bc5f 100644 --- a/src/uosc/elements/Menu.lua +++ b/src/uosc/elements/Menu.lua @@ -1320,7 +1320,7 @@ function Menu:render() actions_rect = { ay = item_ay + margin, by = item_by - margin, - is_outside = display.width - menu_rect.bx + margin * 2 > rect_width, + is_outside = display.width - menu_rect.bx + margin * 2 > rect_width and (item.hint or item.icon), } actions_rect.bx = actions_rect.is_outside and menu_rect.bx + margin + rect_width or item_bx - margin actions_rect.ax = actions_rect.bx