A new theme for JavaFX
Andy Goryachev
andy.goryachev at oracle.com
Tue Dec 3 15:57:20 UTC 2024
I agree with John on the subject of modena and flat themes.
From the platform point of view, I would think we should focus on *enabling* the complex themes by providing the necessary tools. It is currently possible to create e.g. a dark theme, or react to platform preferences' changes, by, for instance, dynamically generating a stylesheet - but the process is not easy.
Adding variables might help more than anything else, in my opinion. Maybe there is a way to publish platform preferences via another set of variables available to CSS.
To be specific, I see the following features that should be available to the CSS designer:
1. consistent padding for compact/roomy user preference
2. derived colors for dark/light/custom themes (I suspect the currently used derive() will not be sufficient)
3. base font
4. component sizing which depends on the base font size
On topic of modena.css, I think we may want to consider updating the stylesheet to support the dark theme as our first priority, leaving designing more elaborate custom theme to the public.
What do you think?
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of John Hendrikx <john.hendrikx at gmail.com>
Date: Tuesday, December 3, 2024 at 02:47
To: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: Re: A new theme for JavaFX
I think we can leave this to the community as FX provides sufficient
means to have a 3rd party provide a theme. There are other themes out
there, and they can be updated with new functionality once it becomes
available in a FX version they're willing to support. Perhaps this one:
https://github.com/mkpaz/atlantafx
I also don't think modena looks that dated. As it is pretty smart with
colors (using variables and ladders to select contrasting colors),
adjusting just its base colors may be sufficient to have it work nicely
as a dark theme.
The modern "super flat almost borderless" look is IMHO counterproductive
and often annoying as it is hard to see where one thing ends and another
thing starts.
--John
On 03/12/2024 01:03, Michael Strauß wrote:
> Continuing the discussion that was started in the CSS media queries thread:
>
>
> On Mon, Dec 2, 2024 at 11:55 PM Kevin Rushforth
> <kevin.rushforth at oracle.com> wrote:
>>> I'm thinking a bit bigger than just "Modena Dark". Since JFX 19, we've
>>> added focusVisible, platform preferences, CSS transitions, and now
>>> hopefully media queries. After this is done, I think we should
>>> leverage all of those new features, and create a bold new theme for
>>> JavaFX that feels at home in the year 2025.
>> Depending on the scope, that's a pretty ambitious goal. :) Were you
>> thinking of something derived from Modena (e.g., a "Modena 2025") that
>> incorporates all of those things and maybe a few other tweaks? Or are
>> you thinking a brand new "from scratch" theme? Based on past experience
>> (the switch from Caspian to Modena in FX 8), the latter will require
>> quite a lot of work, and someone with a good artistic eye and attention
>> to detail to drive it. I expect it would be a fairly long process and
>> require a *lot* of testing.
>>
>> Anyway, that doesn't need to slow down this feature. This feature would
>> help with either approach. And application developers would be able to
>> take advantage in their own stylesheets before that.
>
> While I think that Modena is a nice-looking theme, I can't help but
> think that it's a nice-looking theme for the mid-2010's. It dates the
> JavaFX platform, and its look and feel is the first thing that people
> see when they interact with JavaFX (either with the framework itself,
> or with user-facing applications). The UI landscape has evolved quite
> a lot in the past decade. I think there is great value in completely
> modernizing the JavaFX user experience, firmly and boldly moving it
> forward, and making the framework attractive again for a new
> generation of developers.
>
> Ideally, this is more than a "Modena 2025" refresh. I completely agree
> that this is a big project, and it requires talented people to pull it
> off. However, there _are_ talented UI designers and developers in the
> JavaFX community. I hope this will start a discussion on how a modern
> JavaFX user experience can look like, and how we'd be able to achieve
> it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20241203/fc99c10e/attachment-0001.htm>
More information about the openjfx-dev
mailing list