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 =
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,
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
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
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
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
Here's a CSR that explains the details of the proposed public API:
https://bugs.openjdk.java.net/browse/JDK-8267540
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)
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