How to activate dark theme of Windows 10/11 system settings in SWT applications?

107 Views Asked by At

What do I need to do to make an SWT application use the dark theme / dark mode of system settings in Windows 10 or 11? I couldn't do it with SWT 3.122.0 (Win32 x86_64) from Maven repository.

I tried out to set a system property which is recommended here (https://bugs.eclipse.org/bugs/show_bug.cgi?id=540357):

System.setProperty("org.eclipse.swt.display.useSystemTheme", "true");

But it didn't work.

But it seems to me that the dark theme under Windows is not supported yet in SWT if I understand the information on these forums correctly:

Can you confirm that dark theme does not work for SWT under Windows yet or did I confuse anything?

0

There are 0 best solutions below