Skip to content

Commit

Permalink
tweak: display menu actions outside only if there's item hint or icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklaen committed Aug 30, 2024
1 parent 06f6eb7 commit bfd440d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uosc/elements/Menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfd440d

Please # to comment.