feat: added additional selected menu item indicator

closes #853
This commit is contained in:
tomasklaen
2024-05-09 11:59:06 +02:00
parent 0e60272db1
commit 43dcb51eb9

View File

@@ -1221,6 +1221,15 @@ function Menu:render()
opacity = highlight_opacity * menu_opacity,
clip = item_clip,
})
-- Selected item indicator line
if is_selected then
local size = round(2 * state.scale)
local v_padding = math.min(state.radius, math.ceil(self.item_height / 3))
ass:rect(ax + self.padding - size - 1, item_ay + v_padding, ax + self.padding - 1, item_by - v_padding, {
radius = 1, color = fg, opacity = menu_opacity, clip = item_clip,
})
end
end
-- Icon