Fix window caption buttons invisible in Light theme#43
Merged
Conversation
The minimise/maximise/close glyphs were always the default white, so they all but vanished against the light title bar. The app never set AppWindow.TitleBar's button colours. ApplyTheme (now public, the single theming entry point — WindowsThemeApplier delegates to it) sets theme-appropriate caption-glyph colours from the content's ActualTheme, keeping backgrounds transparent so Mica shows through. An ActualThemeChanged handler refreshes them when the OS flips light/dark while the preference is System. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The minimise / maximise / close glyphs were always the default white, so they were barely visible against the light title bar. The app sets
ExtendsContentIntoTitleBar+ a custom title bar but never configuredAppWindow.TitleBar's button colours, so they fell back to white regardless of theme.Fix
MainWindow.ApplyThemeis now the single theming entry point (made public). It sets the contentRequestedThemeand theAppWindow.TitleBarcaption-button colours, derived from the content's resolvedActualTheme— so the glyphs always contrast with the active theme. Button backgrounds stay transparent so the Mica backdrop still shows through.WindowsThemeAppliernow delegates toMainWindow.ApplyThemeinstead of duplicating the theme switch, so a runtime theme change from Settings updates the caption buttons too.ActualThemeChangedhandler refreshes the glyphs when the OS flips light/dark while the preference is System.Behaviour
Testing
🤖 Generated with Claude Code