JEP: JavaFX controls in the title bar
Andy Goryachev
andy.goryachev at oracle.com
Fri Oct 25 16:13:15 UTC 2024
Dear Michael:
Thank you for adding clarifications to the JEP!
More questions:
- Right-click system menu: is there any way to provide this functionality somehow? May be as a method in the HeaderBar?
- iOS/Android: while the existing PR does not provide support for iOS/Android, does Gluon have any feedback or plans to implement it? I would imagine the mobile users would not care, but the tablet users might. Johan Vos, what do you think?
Could you please add these two columns to the table, even if they contain N/A.
- left/rightSystemInsets: thank you, you probably want to clarify that in these properties' javadoc.
- HeaderBar height: my question was what should the application developers do in order to make the height of the bar to be the same as the native one? Maybe there should be a constant similar to Region.USE_COMPUTED_SIZE to accomplish that?
I am sure there will be more questions once we play with the initial implementation.
Thank you,
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Michael Strauß <michaelstrau2 at gmail.com>
Date: Thursday, October 24, 2024 at 16:29
To:
Cc: openjfx-dev <openjfx-dev at openjdk.org>
Subject: Re: JEP: JavaFX controls in the title bar
> In the table, you mention "custom implementation" for resize borders. What does it mean (who is providing the implementation?)
glass-gtk is providing the implementation; added to the JEP
> Also in the table, please add "right click to invoke the system menu" (this might be a windows-only feature), and the "window shadow" row.
Done.
> I see the native code in your PR refer to iOS, but not Android. Can you add the two columns to the table (even if they are N/A right now)?
I've clarified in the sentence before the table that the feature is
only supported on Windows, macOS, and Linux.
> In the "Superimposed window buttons" section, you mention that the window buttons automatically adapt to the Scene background, yet on Windows (10, I think) the color of buttons is a user-selectable item, as far as I remember. Can you elaborate, maybe with examples (in the JEP)?
I don't think that you can change the colors of windows buttons on
Windows 10 or Windows 11.
> "the system-reserved areas will be empty" meaning non-null (0,0), right?
Correct, added to the JEP.
> "With the absence of a system-provided header bar, the click-to-drag and double-click to maximize behaviors are lost." I read it as the application code must re-implement this functionality, yet afterward you say the HeaderBar provides it. May be it should read "... behaviors would be lost" or something to that effect. The main thing I want to know from reading the JEP is what parts the application developers should implement and what is provided by the new feature.
Clarified in the JEP.
> "leftSystemInset and rightSystemInset" properties. How does this work on RTL platforms? Do these properties retain their left/right semantics, or should they be renamed leading/trailing?
leftSystemInset and rightSystemInset refer to the physical left or
right side, as we have two independent questions:
1. Are the window buttons on the physical left or right side of the
window? (that's what this API answers)
2. Is the JavaFX application running in RTL mode?
> For HeaderBar: what are the steps to ensure that the height of the bar is exactly the same as the native? Same question, but with two initial conditions: the children that can be enlarged or shrink, and the children that might have a minimum size, like TextArea for instance.
The HeaderBar need not be the same height as the native title bar. In
fact, it can be any height. The latest Windows UI design guidelines
even recomment that applications choose an appropriate height:
https://learn.microsoft.com/en-us/windows/apps/design/basics/titlebar-design
HeaderBar will respect the minimum, maximum, and preferred sizes of
its children. If you place a child with a certain min height into the
HeaderBar, it will be at least as high as the child. The same goes for
width.
> What happens if the header bar width is less than the minimum size of its children? Should the trailing children slide out of the view, or should the children be squished beyond their minimum size? Could this be an option? Could this be controlled in the same manner as the GridPane, for example? Is the header bar always clipped?
The HeaderBar width will not be less than the minimum width of its
children. If you resize the window below the minimum width of the
HeaderBar, the children will simply be clipped at the window border.
Note that applications can place a layout container into the HeaderBar
that supports other layout features (for example, overflow menus like
ToolBar).
> Minor question: should there be an explicit safeguard against creating two HeaderBars, or placing them in the unusual place? An exception perhaps?
That would probably only apply to two HeaderBars that are active in
the scene graph. But on the other hand, maybe an application wants to
configure two different header bars, place both of them in the scene
graph, and then only show one of those (maybe toggling the visibility
of both).
I certainly wouldn't create such an application, but who knows what
people will do...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20241025/b69eb169/attachment-0001.htm>
More information about the openjfx-dev
mailing list