On Tue, 22 Oct 2024 17:44:08 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

> Continuing on window attributes. I would like to know what is and is not 
> supported by platform, by feature.
> 
> For example:
> 
> Windows
> 
> * translucency
> * color gradient
> * system menu on right click, on the toolbar and on the app components
> * color accent on hover over window buttons
> * window borders
> * round corners
> * double click to maximize
> * drag to reposition the window
> * dark/light theme
> * accessibility: keyboard focus, accessible focus, narrator
> 
> Did I miss anything?

I'll eagerly invite you to dissect this PR for its merits, its pros and cons. 
However, your questions lead me to conclude that you haven't really looked at 
what I'm proposing. Half of your questions are answered just by looking at the 
documentation for `StageStyle.EXTENDED` and `HeaderBar`. These are the two 
primary APIs that I've mentioned over and over again in this PR.

Let me try to explain `StageStyle.EXTENDED` in different terms:

1. `EXTENDED` is like `UNDECORATED` in the following ways: The application 
controls the entirety of the window. There is no non-client area (i.e. no title 
bar), and you can place scene graph nodes everywhere. Since there is no 
non-client title bar, applications will have to provide their own `HeaderBar` 
and their own system menu (if they so desire).

2. `EXTENDED` is like `DECORATED` in the following ways: The window has a 
resize border, shadows, and window animations. It has the platform window 
buttons (minimize, maximize, close) _superimposed_ over the application window. 
Just as with a decorated window, applications have no control over whether 
corners are rounded, how borders look like, and so on.

Since there is no non-client title bar, all questions regarding the appearance 
or accessibility of the `HeaderBar` (color gradient, dark/light theme, etc.) 
are left to the purview of application developers. `HeaderBar` is a control 
just like any other JavaFX control, and application developers will decide how 
it looks like. Notably, there is no translucency, because JavaFX does not 
support window-level translucency. This has nothing to do with this feature 
proposal, and should be discussed on its own merits.

> Another aspect is whether this should be a conditional feature. If not, how 
> will it be supported on Android/iOS? RaspPI?

I answered this question in the opening post of this PR.
`StageStyle.EXTENDED` is a conditional feature that downgrades to 
`StageStyle.DECORATED` on platforms that don't support it.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2430222052
PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2430224576

Reply via email to