Skip to content

fix(ui): make the drop-down's highlighted row visible - #9

Merged
saudzahirr merged 1 commit into
masterfrom
fix/combo-popup-highlight
Aug 19, 2026
Merged

fix(ui): make the drop-down's highlighted row visible#9
saudzahirr merged 1 commit into
masterfrom
fix/combo-popup-highlight

Conversation

@saudzahirr

Copy link
Copy Markdown
Contributor

The bug

The chart and series drop-downs had one invisible row: whichever item sat under
the cursor rendered as a blank white band, so a chart type could not be picked
by sight.

Cause

Styling QComboBox QAbstractItemView::item gives the popup's rows their own box
model. At that point the view's selection-background-color no longer paints
them, while selection-color still applies — so the highlighted row drew white
text on a white row.

The earlier fix set the popup's selection-background-color, which is why it
looked correct on inspection and still failed on screen.

Fix

The selected, hover and focus states are painted explicitly with the shared
cyan highlight and white text, so the drop-down now matches the menus, tables
and lists.

Verified

Rendered the real popup and sampled its pixels: the highlighted band reads
#24aeff with white glyph pixels, where it previously had none.

Two tests cover it — the popup must paint its own item states using the shared
highlight, and no item-view state anywhere may leave text under 4.5:1 against
its own row. 121 tests pass.

🤖 Generated with Claude Code

The chart and series drop-downs had one invisible row: whichever item was
under the cursor rendered as a blank white band, so a chart type could not be
picked by sight.

Styling QComboBox QAbstractItemView::item gives the popup's rows their own box
model, and at that point the view's selection-background-color no longer paints
them while selection-color still applies. The highlighted row was therefore
drawing white text on a white row.

Its selected, hover and focus states are now painted explicitly with the shared
cyan highlight and white text, so the drop-down matches the menus, tables and
lists.

Two tests cover it: the popup must paint its own item states using the shared
highlight, and no item-view state anywhere may leave text at less than 4.5:1
against its own row.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@saudzahirr
saudzahirr merged commit 3f6bc47 into master Aug 19, 2026
7 checks passed
@saudzahirr
saudzahirr deleted the fix/combo-popup-highlight branch August 19, 2026 17:29
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