Skip to content

fix(paint): paint labeled menu-item icon once - #233

Merged
tiensonqin merged 1 commit into
feat/ml-backendfrom
fix/menu-item-double-icon
Oct 13, 2026
Merged

tiensonqin merged 1 commit into
feat/ml-backendfrom
fix/menu-item-double-icon

Conversation

@tiensonqin

Copy link
Copy Markdown
Collaborator

Menu items with an icon prop and a label painted the glyph twice on the native/SDL paint path: once in the fixed leading slot (control_icon_ops, box branch) and again as a labeled side-slot icon (labeled_content_ops). Visible in Logseq refactor/lui on Linux: every icon in the … page menu appears doubled.

Fix: labeled_content_ops paints only the label for menu-item (its pad already reserves the slot).

Test: lui_paint kinds/menu item single icon (fails with 2 images before the fix).

menu-item's box branch already paints the glyph in the fixed leading
slot via control_icon_ops and text_placement_of reserves the slot in
the label pad; labeled_content_ops painted a second side-slot copy,
so every icon in a Linux/SDL overlay menu appeared twice. Adds a
lui_paint regression test.
@tiensonqin
tiensonqin merged commit e4e9ea5 into feat/ml-backend Oct 13, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant