Skip to main content

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


Paul,

> 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
>      OS.setTheme(true);
>
> to the main method and run with SWT 4956r13 I end up with the attached.

You are expected to set background/foreground colors as you see fit.

For a quick example, please see this test snippet:

https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/tests/org.eclipse.swt.tests.win32/ManualTests/org/eclipse/swt/tests/win32/snippets/Issue0018_DarkCancelSearchIcons.java


Back to the top