Skip to content

Dark Mode Behaviour [Windows] #2606

@jamiedougal

Description

@jamiedougal

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

Image

DarkMode.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions