fix: doubled selection pill title when hardware indicator is shown#782
Merged
frysee merged 1 commit intoJul 19, 2026
Merged
Conversation
The selected list item's title is baked into the screen by the list loop at x = SCALE1(BUTTON_MARGIN + BUTTON_PADDING), and the animated pill-text overlay (globalText) is drawn on top of it. Two of the three overlay draw sites use that same x, so the overlay lands exactly on the baked copy and the label reads as a single crisp string. The static-redraw path used x = SCALE1(PADDING + BUTTON_PADDING) instead. That path runs every frame while a volume/brightness/colortemp indicator is held on a stationary selection, so the overlay was drawn SCALE1(PADDING - BUTTON_MARGIN) = SCALE1(5) to the right of the baked title, producing a doubled/ghosted label. Align this draw site with the other two so the overlay always sits on top of the baked title.
frysee
force-pushed
the
fix/selection-pill-text-doubling
branch
from
July 19, 2026 14:52
96eeacd to
063d802
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug where the selected list item's title renders doubled / ghosted whenever a hardware indicator (volume, brightness, or color temperature) is shown while sitting on a stationary selection.
Root cause
The selected item's title is drawn twice, by design:
x = SCALE1(BUTTON_MARGIN + BUTTON_PADDING).globalText) is drawn on top of it.Two of the three
globalTextdraw sites use that same x, so the overlay lands exactly on the baked copy and the label reads as a single crisp string.The static-redraw path used
x = SCALE1(PADDING + BUTTON_PADDING)instead. That path runs every frame while a volume/brightness/colortemp indicator is held on a stationary selection, so the overlay was drawnSCALE1(PADDING - BUTTON_MARGIN)=SCALE1(5)to the right of the baked title — producing the doubled/ghosted label.Fix
Align the static-redraw draw site with the other two (
nextui.c), so the overlay always sits directly on top of the baked title:One line, shared code — applies to all platforms.
Testing
Built with the correct per-platform toolchains and verified on hardware:
Both boot normally and render the selected pill correctly during and after the indicator is shown.
Note on tg5040 visibility
The doubling was only visible on tg5050, even though the code path is shared. On tg5040 the second (offset) copy stayed hidden because that platform composites the baked title differently — it presents through
/dev/fb0, so the misaligned overlay copy was covered rather than shown. The fix is a no-op there visually (the overlay already coincides with the baked title after alignment) and was confirmed on hardware to introduce no regression or position shift.Before (TSP-S)
After (TSP-S)