On Wed, 6 Dec 2023 19:46:50 GMT, Jose Pereda <[email protected]> wrote:

> So I guess we'll need to review this `HighContrastScheme` enum, and see why 
> `HighContrastScheme::fromThemeName` is not used.

At some point, the call to `HighContrastScheme::fromThemeName` was lost. I've 
added it back in and discovered an additional problem with the existing 
implementation:

The high-contrast scheme name that we get from the OS is always localized, 
independent of the JVM locale. Originally, the implementation matched the 
scheme name to a list of well-known localized scheme names, but only tested the 
names for the current JVM locale.

Since there's no easy way to determine the OS locale, I've changed the 
implementation such that we now try to match the scheme name to _all_ known 
localized names. I've tested this with different OS/JVM locales, and it seems 
to work.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1014#issuecomment-1843952106

Reply via email to