Repository navigation
Conversation
Changing useDarkModeExplorerTheme through Display.setData now reaches existing controls through a new updateDarkSystemTheme hook, and Buttons use it to change their theme. Before, only Buttons created after the switch used the new theme. Assisted-by: multiple AI agents and layers of automated tooling 🤖
| int inset = 2; | ||
| int radius = 3; | ||
| if (useDarkModeExplorerTheme && OsVersion.IS_WIN11_21H2) { | ||
| if (display.useDarkModeExplorerTheme && OsVersion.IS_WIN11_21H2) { |
There was a problem hiding this comment.
Do we still support Windows 11?
There was a problem hiding this comment.
Do we still support Windows 11?
Yes.
There was a problem hiding this comment.
It the question about Windows 10? The current minimum version is the August 2016 update of Windows 10.
There was a problem hiding this comment.
Do we still support Windows 11?
If the question is about Windows 10, AFAIK we do not actively test it but we do not want to break it on purpose. IIRC I fixed a few Win10-only issues in the last 6 months.
There was a problem hiding this comment.
It the question about Windows 10? The current minimum version is the August 2016 update of Windows 10.
Is it still tested somewhere? If not I think we should increase the minimum number at some point, working on win10 issues were hard and time consuming for me, as I had no way of checking the results.
There was a problem hiding this comment.
My question was triggered by this OsVersion.IS_WIN11_21H2
Switching between the light and dark theme at runtime, through
Display.setDarkThemePreferredor theuseDarkModeExplorerThemedata key, only affected Buttons created afterwards, so existing Buttons kept the old theme until a restart.Displaynow calls a new internalupdateDarkSystemThemehook for every control of the open shells when this setting changes, and Buttons use it to apply or remove the dark Explorer theme.Buttons also stop caching the setting, so the size of their focus rectangle follows the current theme.
Other controls can use the same hook in follow-up changes.