Repository navigation
fix(app): dark title bar on Windows 10 - #53
Merged
Merged
Conversation
Windows 10 ignores DWMWA_CAPTION_COLOR/TEXT_COLOR (35/36), so with Windows light and the app Dark the title bar stayed white, a regression from 1.x. TitleBar.Apply now also sets DWMWA_USE_IMMERSIVE_DARK_MODE (20) from the background luminance, before the colors, which still win on Windows 11. Note in ADR 0027, point 1.
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.
Parity check of phase 1, deviation 4: on Windows 10 22H2, with Windows light and the app Dark, the title bar stayed white. Windows 10 ignores
DWMWA_CAPTION_COLOR/DWMWA_TEXT_COLOR(35/36); 1.x setsDWMWA_USE_IMMERSIVE_DARK_MODE(20) insrc/modules/App.Theme.ps1.TitleBar.Colorsreturns(Caption, Text, Dark);Applysets attribute 20 fromDarkbefore 35/36, which still win on Windows 11. Attribute 19 (builds before 2004) is not handled.TitleBarTests:Darktrue for 0x202020, false for 0xF3F3F3.Tested:
dotnet test --solution app\WinGetStudio.slngreen; by hand in the Hyper-V VM Windows 10 22H2 (Dark makes the bar dark, Light makes it light again, at run time) and on Windows 11 (bar unchanged, caption buttons readable in both themes).