Re: Make themes a first-class concept in JavaFX

2021-05-25 Thread Michael Strauß
Maybe others will chime in regarding the thin vs. rich API discussion. Regarding the extensibility of themes: If Modena and Caspian were public API, you could extend those themes simply by subclassing: public class CustomTheme extends Modena { private final ObservableList allStylesheets =

Re: Make themes a first-class concept in JavaFX

2021-05-25 Thread Pedro Duque Vieira
Again thanks for bringing this up into discussion and for taking the time to file a PR, etc. I like the idea of having better support for themes. Regarding your first point: 1 - To keep it simple we can discard the idea of having an API to be able to check what are the OS settings for dark/light,

Re: Make themes a first-class concept in JavaFX

2021-05-24 Thread Michael Strauß
I can understand that parsing string values feels like a very lackluster API. But let me offer a counterpoint: If we provided a set of APIs that exposed particular OS concepts (light/dark mode, accent coloring, etc.), we would commit ourselves to supporting these APIs for new versions of all kinds

Re: Make themes a first-class concept in JavaFX

2021-05-24 Thread Pedro Duque Vieira
Hi, I've been developing JMetro: https://pixelduke.com/java-javafx-theme-jmetro/ , it's a javafx I've been developing since 2013 when I have some free spare time. I thought I'd chime in since this has been an interest of mine for quite some time. A few issues I experience with the current JavaFX

Re: Make themes a first-class concept in JavaFX

2021-05-21 Thread Michael Strauß
Good point about the STYLESHEET_CASPIAN and STYLESHEET_MODENA values. Here are a few more aspects for discussion: Any sufficiently sophisticated theme will probably be comprised of several stylesheets. In fact, the built-in themes are a good example for that. Since the current API doesn't allow t

Re: Make themes a first-class concept in JavaFX

2021-05-21 Thread Kevin Rushforth
Please file an Enhancement request first, and from that enhancement create a new CSR. Ideally JBS would prevent direct creation of an issue with an issuetype of CSR. As for the feature itself, it seems useful, but will need discussion as to the value proposition (i.e., cost / benefit), and the

Re: Make themes a first-class concept in JavaFX

2021-05-21 Thread Michael Strauß
Here's a CSR that explains the details of the proposed public API: https://bugs.openjdk.java.net/browse/JDK-8267540

Re: Make themes a first-class concept in JavaFX

2021-05-21 Thread Tom Eugelink
I've been a proponent of a theme implementation for a long time, even before JavaFX was separated out (had quite a few discussions with Jonathan about it). So this proposal is great! On 2021-05-21 06:36, Michael Strauß wrote: Currently, the two themes shipped with JavaFX (Caspian and Modena)

Make themes a first-class concept in JavaFX

2021-05-20 Thread Michael Strauß
Currently, the two themes shipped with JavaFX (Caspian and Modena) are implemented as a set of stylesheets and some internal logic, mostly in `PlatformImpl`. Much of this logic deals with optional features or platform-specific theme modifications. Another piece of logic deals with accessibility th