Platform preferences theme detection

Christopher Schnick crschnick at xpipe.io
Sat Feb 10 04:55:19 UTC 2024


Lastly I also tried it on macOS. The accent color detection works there, 
but the color scheme detection does not, i.e. it always returns light 
mode. I'm using macOS Sonoma 14.3 with aarch64.

Here are the preferences when dark mode is set in the settings:

So since you are thinking about making this a preview-only feature, I 
don't think there is that much to do to properly handle systems where 
some properties are not supported. Just a few methods to set the default 
value of foreground, background, and accent color would be enough. In 
theory I don't need to know exactly what color observation is supported, 
I only want to have the ability to use my own colors as defaults in that 
case.

Best
Christopher Schnick

On 06/02/2024 01:57, Christopher Schnick wrote:
>
> Alright, if the accent is not supported yet then almost everything is 
> fine I guess. The settings issue is not noticeable as all the updates 
> happen very fast.
>
> I want to open my previous question about detecting unsupported colors 
> again here. So I assume that for example accent detection is not 
> supported on any Linux system and I have not tested yet how widespread 
> the support for color scheme detection is on other desktop 
> environments. From an application developer's point of view, the 
> platform preferences feature loses some appeal if there is no way of 
> enabling a control flow like: If the system color is supported use 
> that one, else use the color that I manually define somehow.
>
> So it would be nice to either have a relatively simple way of 
> detecting which basic color property foreground, background, accent, 
> color scheme is actually supported or allow application developers to 
> set the default value for that property manually. In this case, I 
> could just set a good looking default accent color, which would then 
> be returned on Linux systems as that property is not supported yet.
>
> I don't have access to the JBS, I'm not even sure how you get that.
>
> On 2/6/2024 1:26 AM, Michael Strauß wrote:
>> Hi Christopher!
>>
>> 1) Accent color detection is not yet implemented for Linux/GTK. I 
>> think this is a fairly recent addition for Ubuntu, probably in 
>> version 22.
>>
>> 2) I don't see this behavior on my Ubuntu 20.04 system (need to 
>> upgrade to 23 and test again). If you have acess to JBS, feel free to 
>> open a bug ticket to track this issue.
>>
>>
>> On Mon, Feb 5, 2024 at 10:56 PM Christopher Schnick 
>> <crschnick at xpipe.io> wrote:
>>
>>     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:
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240210/0a289c88/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-02-10 at 05.45.59.png
Type: image/png
Size: 192507 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240210/0a289c88/Screenshot2024-02-10at05.45.59-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-02-10 at 05.47.20.png
Type: image/png
Size: 130446 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240210/0a289c88/Screenshot2024-02-10at05.47.20-0001.png>
-------------- 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/20240210/0a289c88/img-0001.png>


More information about the openjfx-dev mailing list