Fix: Dark/Light mode dialogs Find/Replace, Goto Line, and Find in Files dialogs#20
Open
electricmessiah wants to merge 1 commit into
Open
Conversation
electricmessiah
commented
Jul 9, 2026
- Dialog backgrounds (the space between controls) were never explicitly painted; the window class's null hbrBackground means DefWindowProc's default WM_ERASEBKGND handling is a no-op, so add an explicit handler that fills with the theme color (dark) or COLOR_BTNFACE (light).
- Checkbox (BS_AUTOCHECKBOX) label text ignored WM_CTLCOLORBTN's color while visual styles were active, rendering black-on-dark and unreadable; strip visual styles on checkboxes in dark mode (reversible) so the color takes effect.
- All theming (titlebar, child-control theme, checkbox visual style) was only ever applied once at dialog creation. Since these dialogs are cached (shown/hidden, not recreated), toggling dark mode after a dialog was already open left it permanently on the stale theme, and once dark had disabled a checkbox's visual style, going back to light never restored it. Re-apply full theming on every dialog show and immediately when dark mode is toggled while a dialog is already open.
- Fixed a pre-existing layout bug surfaced by the above: the Wrap around checkbox's bounding box (x=330..410) overlapped the button column (x=360..450) by 50px in the Find/Replace dialog; widened the dialog and shifted the button column clear of it.
…n dark mode - Dialog backgrounds (the space between controls) were never explicitly painted; the window class's null hbrBackground means DefWindowProc's default WM_ERASEBKGND handling is a no-op, so add an explicit handler that fills with the theme color (dark) or COLOR_BTNFACE (light). - Checkbox (BS_AUTOCHECKBOX) label text ignored WM_CTLCOLORBTN's color while visual styles were active, rendering black-on-dark and unreadable; strip visual styles on checkboxes in dark mode (reversible) so the color takes effect. - All theming (titlebar, child-control theme, checkbox visual style) was only ever applied once at dialog creation. Since these dialogs are cached (shown/hidden, not recreated), toggling dark mode after a dialog was already open left it permanently on the stale theme, and once dark had disabled a checkbox's visual style, going back to light never restored it. Re-apply full theming on every dialog show and immediately when dark mode is toggled while a dialog is already open. - Fixed a pre-existing layout bug surfaced by the above: the Wrap around checkbox's bounding box (x=330..410) overlapped the button column (x=360..450) by 50px in the Find/Replace dialog; widened the dialog and shifted the button column clear of it.
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.