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


investigated using the SWT.Skin event to apply theme changes (on top of the existing hacks activated by calling OS.setTheme(true)).

This doesn't work too badly although due to the delayed nature of the event dispatch any overrides the existing code has applied tend to get trashed.

Also code that attempts to set colours back to "defaults" (e.g. widget.setBackground(null)) will remove any applied theme.

Composite borders are also not included in the OS.setTheme hacks so I had to create a separate composite and draw the border in the themed colour myself.

Well that's life. The root problem here is that Windows doesn't have any public API for dark theme, period. In SWT and Eclipse, we colored what we could and applied all sorts of workarounds for the rest.

Back to the top