Skip to content

Commit

Permalink
fix: menu item title sometimes overlapping actions
Browse files Browse the repository at this point in the history
closes #960
  • Loading branch information
tomasklaen committed Aug 31, 2024
1 parent 641aa43 commit 90dd597
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/uosc/elements/Menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,10 @@ function Menu:render()
local title_min = math.min(item.title_width, width * 0.5)
local hint_min = math.min(item.hint_width, width * 0.5)
local title_ratio = item.title_width / (item.title_width + item.hint_width)
title_clip_bx = round(content_ax + clamp(title_min, width * title_ratio, width - hint_min))
title_clip_bx = math.min(
title_clip_bx,
round(content_ax + clamp(title_min, width * title_ratio, width - hint_min))
)
end

-- Hint
Expand Down

0 comments on commit 90dd597

Please sign in to comment.