Dark Mode Behaviour [Windows] #2609
Unanswered
jamiedougal
asked this question in
Q&A
Replies: 1 comment
-
To the best of my knowledge, SWT does not provide any integrated theming support and the Win32 controls of Windows do not support native theming either. This is why the Eclipse Platform has its own theming implementation, which basically just sets colors and other properties of the controls. So would have to manually do it for a pure SWT application on Windows. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a standalone SWT application, and are trying to get dark model to work under windows.
We are using Java 21, SWT 4.37. Under OSX dark mode works as expected - under Windows it displays as if it were light mode.
Calling OS.setTheme(true) at the start will shift the title bar to dark mode, but no other controls. Reviewing other forums and tickets, we have seen calls setting various win32 properties at startup, to no effect. Seeing that the call to OS.IsDarkModeAvailable returns false, we have used reflection to tweak the properties that depend on that to be true.
The only workaround seem to be manually setting the colours during the SWT.Skin event. Is there another way that we are missing to open in dark mode under windows?
Thanks.
Jamie
DarkMode.java
Beta Was this translation helpful? Give feedback.
All reactions