<div dir="auto">I think we should wait and don't do this in the short term.<div dir="auto"><br></div><div dir="auto">Many recent apps don't care for platform appearance at all. </div><div dir="auto"><br></div><div dir="auto">Take Microsoft windows for an example, there are many layers of "evolution" and they all look different on the same OS. </div><div dir="auto"><br></div><div dir="auto">Linux will be a nightmare, you have many desktop environments, and if you only consider gnome, it's all CSS based and you can't just obtain a color (because it's on the css). Recent Ubuntu have accent colors, but that's if you use the Yaru theme.</div><div dir="auto"> </div><div dir="auto"><br></div><div dir="auto">If in the future apps start to look the same again we should consider it. The tendency right now seems to be "apps don't have to look the same".</div><div dir="auto"><br></div><div dir="auto">Behavior should be consistent, style probably don't.</div><div dir="auto"><br></div><div dir="auto">-- Thiago</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Em qua., 14 de jun. de 2023 15:47, Kevin Rushforth <<a href="mailto:kevin.rushforth@oracle.com">kevin.rushforth@oracle.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm finally catching up on the platform preferences API discussion, most <br>
of which is in Draft PR #1014 [1]. The information captured here [2] <br>
provides a good summary of the API.<br>
<br>
A PR isn't really the best place to discuss the question of whether this <br>
feature is useful and whether the API is heading in the direction we <br>
want, so I wanted to have a high level discussion of that here.<br>
<br>
First of all, I do see the value in having some way to provide the <br>
platform-specific properties like colors, etc, to the user. I'm less <br>
sure that the same class should also allow overriding those properties, <br>
but I can see the value of providing *some* way for the application to <br>
override them.<br>
<br>
In order to move this forward, we need to answer the following questions:<br>
<br>
1. Is this functionality something we want in the core of JavaFX? I <br>
think the answer is "yes", and it seems like others agree.<br>
<br>
2. What is the best way to expose this capability? Currently it is <br>
proposed as an interface that extends ObservableMap (meaning that it <br>
*is* a Map rather than *contains* a map or has some other map-like <br>
representation). This seems fine to me, based on the discussion in the PR.<br>
<br>
3. Should the platform preferences API provide the ability to set the <br>
properties (to override them) or should that capability be provided some <br>
other way (e.g., by some other class)? Perhaps this belongs as part of <br>
an eventual theming API, possibly via a "user preferences" class that <br>
extends or wraps the platform preferences class? At least the currently <br>
proposed API moved away from the odd "override" semantics and uses the <br>
standard "put" semantics. That, coupled with the two "reset" methods is <br>
a reasonable API, but I'm still not convinced that the core platform <br>
preferences class is the place for it. Please consider whether having a <br>
separate user / theme preferences interface / class, in addition to the <br>
(read-only) system preferences, might be better.<br>
<br>
4. Is an Appearance enum the best way to provide the indication of LIGHT <br>
vs DARK? Do we need it as part of the Preferences API or should it wait <br>
until one of the later RFEs?<br>
<br>
5. How do you anticipate this be used by an application prior to having <br>
CSS themes?<br>
<br>
-- Kevin<br>
<br>
[1] <a href="https://github.com/openjdk/jfx/pull/1014" rel="noreferrer noreferrer" target="_blank">https://github.com/openjdk/jfx/pull/1014</a><br>
<br>
[2] <br>
<a href="https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548#platform-preferences" rel="noreferrer noreferrer" target="_blank">https://gist.github.com/mstr2/9f46f92c98d3c86aa6a0b4224a9a6548#platform-preferences</a><br>
<br>
</blockquote></div></div>