win32 dark mode: fields wear a dark edge, the accent colour while focused - #173
Merged
Merged
Conversation
…used The dark theme class darkens an EDIT and what it draws inside, but the sunken client edge around it is the system's, drawn in its 3D colours, and stayed a white two-pixel line on the dark ground: a form on a dark system had every field and its text area boxed in white. Every field and text area now paints its own edge in WM_NCPAINT (styled_field_proc, installed at creation rather than only for a sheet border): a sheet border at the width and colour asked for; otherwise, on a dark system, the dark frame Explorer's fields wear, in the user's accent colour while the field has the focus, which is what a Windows 11 text box does; otherwise the system's own. Focus changes repaint the frame, and the theme flip repaints every frame with the grounds. The progress fill is the accent colour too (w32_accent_color, DwmGetColorizationColor) rather than a hard-coded blue. Verified natively: runtime test, 14 headless and 10 on-screen specs, and captures of the form example at rest and focused.
…-frame # Conflicts: # CHANGELOG.md # backend/aether_ui_win32.c
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.
A design fix for the dark theme on Windows.
DarkMode_CFDdarkens an EDIT and what it draws inside, but the sunken client edge around it (WS_EX_CLIENTEDGE, two pixels of non-client area the system draws in its 3D colours) stayed a white two-pixel box around every field and text area on the dark ground — the form example looked wired in white.styled_field_procis now installed on every field and text area at creation (it used to be installed only when a sheet gave the field a border) and paints the edge inWM_NCPAINT:WM_SETFOCUS/WM_KILLFOCUSrepaint the frame; the theme flip (ImmersiveColorSet) repaints every frame along with the grounds (RDW_FRAME).w32_accent_color()reads the accent from DWM (DwmGetColorizationColor); the progress bar's fill uses it too instead of a hard-coded blue.Captured through the driver on this box (system dark, accent red): fields and the text area in a subtle dark frame; the focused Name field in the accent; the progress fill in the accent. Verified natively: runtime test, 14 headless and 10 on-screen driver specs unchanged.