Skip to content

Conversation

@AufarZakiev
Copy link
Contributor

@AufarZakiev AufarZakiev commented Nov 13, 2025

Fixes #5274

Description of the Change

  1. Bumps WxWidgets version to be higher than 3.3
  2. Forces common elements to use OS theme
  3. Retrieves dark theme flag and carefully repaints
  • Charts (Statistics, Disk panels)
  • Progress bars (to make progress values easily visible)
  • Notices list

Note: wxWidgets' IsDark() returns false on Win 11 now even if dark mode is enabled. Therefore, registry reading mechanism was introduced as an additional check

Tested on Win 11.

Alternate Designs

  • Should we force version bump? If WxWidgets is outdated, the code still works in always-light mode. Vcpkg complains about this version constraint too

Screenshots:

image image image

Release Notes
Add Dark Mode support for Windows

@AufarZakiev AufarZakiev marked this pull request as draft November 13, 2025 21:20
@AufarZakiev AufarZakiev force-pushed the feature/dark-mode-win branch from 790880a to d0a5c6f Compare November 13, 2025 21:20
@AufarZakiev
Copy link
Contributor Author

Nice PR number for such a change, btw

@AenBleidd
Copy link
Member

@AufarZakiev,

Note: wxWidgets' IsDark() returns false on Win 11 now even if dark mode is enabled. Therefore, registry reading mechanism was introduced as an additional check

For Windows use IsSystemDark() function instead:
https://docs.wxwidgets.org/latest/classwx_system_appearance.html#ac6c70858bb3e4c35a0b1af42997b6c42

@AufarZakiev
Copy link
Contributor Author

AreAppsDark() fits better, doesn't it?
At least, apps on my desktop react on this value and ignore IsSystemDark()

@AenBleidd
Copy link
Member

AreAppsDark() fits better, doesn't it?

Yes, it looks like this is really better. Good catch!

// wxWidgets' IsDark() returns false on Win 11 now even if dark mode is enabled
// so we need to additionally check the registry for the dark mode setting
m_isDarkMode = m_isDarkMode || IsWindowsInDarkMode();
MSWEnableDarkMode(wxApp::DarkMode_Auto);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is needed? I do remember when I tested the dark mode, I didn't have this enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it according to docs. Yes, without it just ignores OS settings

@CharlieFenton
Copy link
Contributor

@AufarZakiev @AenBleidd Please make absolutely sure that all your changes are guarded by #ifdef _WIN32 to prevent creating problems for Mac and Linux.

@CharlieFenton
Copy link
Contributor

@AufarZakiev @AenBleidd Please make absolutely sure that all your changes are guarded by #ifdef _WIN32 to prevent creating problems for Mac and Linux.

or #ifdef __WXMSW__

@AenBleidd
Copy link
Member

@CharlieFenton, of course we will, no worries. This is too far from being finished, and it's too early to talk about this now, but this is definitely something I will keep in mind while doing a review of the code.

@AufarZakiev AufarZakiev force-pushed the feature/dark-mode-win branch from d0a5c6f to 6f72d16 Compare November 14, 2025 12:59
@AufarZakiev AufarZakiev force-pushed the feature/dark-mode-win branch from 6f72d16 to 83f4cf0 Compare November 14, 2025 17:26
@AufarZakiev AufarZakiev marked this pull request as ready for review November 16, 2025 05:28
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.

[Manager] Add dark mode support on Windows

3 participants