Platform preferences theme detection

Christopher Schnick crschnick at xpipe.io
Mon Feb 5 21:56:36 UTC 2024


I finally found some time to test the latest ea build and can confirm 
that it works now on Windows as expected.

Next, I moved to Linux, more specifically Ubuntu 23.04, and encountered 
some issues:
- The accent color detection does not work, i.e. it does not initially 
detect the value set in the settings and also does not change when I 
modify the accent color in the Ubuntu Settings. I can see some values 
changing in the map, however the end result is still the same
- When opening the Ubuntu Settings application, the entire platform 
preferences map is updated with weird values but somehow changes back 
immediately after. Maybe it reports the default light mode colors for a 
split second when opening the settings?

Once again I do not know whether this is intended or not as there is no 
definitive list of which operating systems are supported. Here is the 
obligatory preferences map on that system:


On 1/30/2024 2:09 PM, Nir Lisker wrote:
>
>      I'm under the impression that the last available 22+ea maven
>     release, which is now almost 3 months old, does not contain the
>     platform preferences API
>
>
> You are correct, the new API was added a month after the latest ea 
> build. Versions 11-21 all had at least 1 ea release per month on 
> average. Not sure why 22 doesn't.
>
> Johan, do you do these releases or are they part of OpenJFX?
>
> On Tue, Jan 30, 2024 at 2:39 PM Christopher Schnick 
> <crschnick at xpipe.io> wrote:
>
>     Hello Nir,
>
>     I'm not entirely familiar with every ea build, but I'm under the
>     impression that the last available 22+ea maven release, which is
>     now almost 3 months old, does not contain the platform preferences
>     API and also does not contain the kinda important css performance
>     regression fixes.
>
>     On 1/30/2024 1:33 PM, Nir Lisker wrote:
>>     Hi Christopher,
>>
>>     Looking at Maven Central,
>>     https://mvnrepository.com/artifact/org.openjfx/javafx, JavaFX
>>     releases ea builds there, which I sometimes use myself from
>>     Maven/Gradle. Version 21 had 6 ea versions, and 22 has 3. The
>>     release cycle is 6 months per final version (aligned with OpenJDK).
>>
>>     - Nir
>>
>>     On Tue, Jan 30, 2024 at 2:18 PM Christopher Schnick
>>     <crschnick at xpipe.io> wrote:
>>
>>         Alright I will try out the new ea release once the fix is
>>         integrated. Other than that, everything works fine for me so
>>         far with observing colors using the platform-specific strings.
>>
>>         As a side note, I think the community would have caught this
>>         issue earlier if there were more frequent maven releases of
>>         ea builds. As of right now, the only way to properly use
>>         recent ea features is downloading the jars and jmods manually
>>         from the jdk.java.net <http://jdk.java.net> site, which is
>>         cumbersome. I don't know how much of the maven release
>>         pipeline is automated and how much work more frequent ea
>>         releases would be, but it would definitely help with early
>>         testing and adoption.
>>
>>         On 1/29/2024 11:09 PM, Michael Strauß wrote:
>>>         I see that the names of the platform mappings defined in
>>>         WinApplication::getPlatformKeyMappings() are simply wrong
>>>         ("Windows.UIColor.ForegroundColor" instead of
>>>         "Windows.UIColor.Foreground"), so the platform mappings are
>>>         not applied to the properties.
>>>
>>>         That's quite surprising, and it's a change that must have
>>>         slipped into the feature at a very late stage during
>>>         development, so that it went unnoticed by all reviewers.
>>>         I'll file a bug and prepare a fix for this issue.
>>>
>>>
>>>         On Mon, Jan 29, 2024 at 10:45 PM Christopher Schnick
>>>         <crschnick at xpipe.io> wrote:
>>>
>>>             Hello Michael,
>>>
>>>             I took a look at the implementation and tried to find
>>>             the issue. From what I can see, the mappings returned
>>>             are correct:
>>>
>>>
>>>
>>>             but it seems like they are somehow not applied the
>>>             PreferencesProperties:
>>>
>>>             Let me know whether I can help with anything to debug
>>>             this issue.
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240205/bdfcca0d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img.png
Type: image/png
Size: 97121 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240205/bdfcca0d/img-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img1.png
Type: image/png
Size: 39755 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240205/bdfcca0d/img1-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img2.png
Type: image/png
Size: 36000 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240205/bdfcca0d/img2-0001.png>


More information about the openjfx-dev mailing list