Platform preferences theme detection
Christopher Schnick
crschnick at xpipe.io
Mon Jan 29 20:23:18 UTC 2024
Hello,
I just tried out the new 22-ea+27 build to see whether we can utilize
some of the new features, particularly the platform preferences API, to
replace the library https://github.com/Dansoftowner/jSystemThemeDetector
that we are currently using for theme detection.
I'm running this on Windows 10 with the latest updates and the color
scheme always reports LIGHT, even when dark mode is enabled in the
settings. The observable value also does not update when the value
changes in the settings. Obviously I have a few questions here:
- Should this feature work in that ea version?
- Is Windows 10 supported by the color scheme detection?
- The documentation says that LIGHT is returned in case theme the
detection is not supported. But I guess there is no way to find out
whether querying that property is supported on the current system? It
might be useful in some circumstances to adapt the behavior when we know
that this is not supported.
- The documentation mentions that some preferences might not be
available on the current system. Does that mean that if they are
available, they are also observable? Or might it be possible that a
certain setting is available but does not support dynamically updating
at runtime and cannot be observed?
Best regards
Christopher
More information about the openjfx-dev
mailing list