Skip to content

Restore custom fonts after theme changes#623

Open
ph10w wants to merge 2 commits into
derceg:masterfrom
ph10w:codex/fix-bookmarks-toolbar-font
Open

Restore custom fonts after theme changes#623
ph10w wants to merge 2 commits into
derceg:masterfrom
ph10w:codex/fix-bookmarks-toolbar-font

Conversation

@ph10w

@ph10w ph10w commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • restore an active custom font after a control processes WM_THEMECHANGED
  • notify font observers after restoration so toolbar button metrics and rebar sizing are refreshed
  • generalize the existing tooltip-specific handling to all controls managed by MainFontSetter
  • add a regression test covering the bookmark toolbar startup path

Root cause

The application applies the theme after the main window and its child controls have been created. SetWindowTheme() causes toolbar controls to reset their font to the system default. The existing MainFontSetter theme-change handling only restored fonts for tooltip controls, so the bookmark toolbar used the default size after startup until the user increased or decreased the text size.

User impact

The configured main font size is now applied consistently to the bookmark toolbar immediately after startup. Users no longer need to change the text size once per session to refresh the toolbar.

Validation

  • built Explorer++ in Release|x64
  • built TestExplorer++ in Release|x64
  • passed all 7 BookmarksToolbar* tests, including the new regression test
  • full test suite: 781 of 782 tests passed; the remaining FormatSizeString.Simple failure is locale-dependent and expects a decimal point while the German locale produces a decimal comma

@ph10w
ph10w marked this pull request as ready for review July 17, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant