Repository navigation
fix(sidebar): color a selected row's fold triangle like its text - #1024
Merged
Merged
Conversation
AppKit draws the disclosure triangle from the outline's appearance, which is pinned to the sidebar background's brightness. On a selected row the triangle sits on the selection pill instead, so a dark theme with a light selection-background (Catppuccin Mocha) drew a light triangle on a light pill. The row view now gives a selected row's triangle the appearance that matches the selected row text, and clears it on deselect; a theme change re-applies it. Fixed #1020
Deploying agterm with
|
| Latest commit: |
9c472fa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c84aa131.agterm.pages.dev |
| Branch Preview URL: | https://fix-selected-row-chevron.agterm.pages.dev |
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.
on a selected sidebar row the companion fold triangle kept its unselected color. With a dark theme whose
selection-backgroundis light (Catppuccin Mocha), that drew a light triangle on a light pill, so it disappeared.AppKit draws the disclosure triangle from the view's appearance alone, and the outline's appearance is pinned to the sidebar background's brightness. A selected row's triangle sits on the selection pill instead.
SidebarRowViewnow gives that row's disclosure button the appearance matching the selected row text (light text getsdarkAqua, dark text getsaqua) and clears it on deselect, so an unselected triangle keeps inheriting the outline pin. It is applied from the same places the cell's selection tint already is: selection change, the button attaching to the row, and the theme-change pass. Only the button's appearance changes, the cell, badge and rename field are untouched.themeTextColorbecame static so the row view can read it without a cell.Two hosted tests pin it: select and deselect a companion parent, and a theme-change pass restoring a stale triangle. Both fail without the fix. Checked by eye in a Debug instance on Catppuccin Mocha: dark triangle on the selected pill, light again once the row is deselected, and it follows a live theme switch with the row selected.
No control API or docs change, it is drawing only. Remote rows use the same row view.
Fixed #1020