Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Enabling dark theme support for SWT stand-alone applications on Windows

I have a stand-alone SWT application (BiglyBT, that runs with a dark theme on Linux and OSX just fine. However, on Windows I am stuck trying to figure out how to do this.

I've been following the [Win32][DarkTheme]... discussions on Bugzilla for a while, and see that the Eclipse IDE itself is working well with a dark theme on Windows 10/11, so it seems to me that SWT support is pretty complete.

As an example, what would I need to do to get

    java -classpath swt.jar org.eclipse.swt.examples.controlexample.ControlExample

to run with a dark theme? If I add


to the main method and run with SWT 4956r13 I end up with the attached.

If I understand the comment in setTheme correctly ( "just some tweaks to tailor things that SWT can't color properly" ) then all I am seeing are the tweaks and the underlying SWT controls are not picking up the theme at all.

Kind regards,


Back to the top