fix(hig): draw the switcher's highlighted row with its accent fill - #3251
Merged
Merged
Conversation
In a popover and in a source list AppKit draws a row's selection with a material view and configures it only when the row's stored emphasis changes. A chooser row answered emphasis from its getter, so the stored value never changed and the fill stayed grey under cells that had turned white. The row now stores the chooser rule through the setter, re-derives when it joins a window and on the window key notifications, and copies the style into its cells in the same call. Fixes #3249
… early The macOS 26 CI runner gives a row selected outside a window no selection material, so the two material tests could not stage their order there. They now ask the host first and are skipped where it builds none. Two tests cover what the gate leaves open: the emphasis AppKit stores is asserted on every host, and the stage is checked to build its row so the gate cannot hide a broken setup.
…-selected-state # Conflicts: # CHANGELOG.md
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.
Why
The highlighted row in Switch Database showed white text on a light grey fill, close to unreadable. It happened on every open, and in Switch Connection after a search that matched nothing.
In a popover AppKit draws a row's selection with a material view and configures it only when the row's stored
isEmphasizedchanges. The row answered emphasis from its getter, so the stored value never changed and the fill kept the look it got before the row had a window, while the cells turned white.Change
Verified
Five tests in
FieldDrivenListEmphasisTestsfail on main. The two selection-material tests are skipped on the macOS 26 runner, which builds no selection material for a row outside a window; the stored-emphasis test covers that order there. Checked on a Debug build on macOS 27 in both switchers, the floating panel and on app deactivation. No UI test: the fill is not an accessibility attribute.Screenshots
Not in this PR
Fixes #3249