JEP: JavaFX controls in the title bar
Michael Strauß
michaelstrau2 at gmail.com
Fri Nov 15 23:26:29 UTC 2024
That's correct. The only thing you can't do out-of-the-box with HeaderBar
is assign different backgrounds to each of the areas (HeaderBar is a
Region, which only has a single background).
Of course, you can place another layout container in one of the areas, and
give the nested container a different background.
But this doesn't really work for the part of the header bar that is
obscured by window controls. For example, let's assume we want to have a
split header bar, but have the background of the left area be different
than the background of the right area. If we simply place another container
in the left area, and change its background, then the new background will
be shifted to the right on macOS (due to the window controls on the left
side of the window), and will not be shown below the window controls.
Application developers could solve this problem in several ways, but here's
one: make the HeaderBar background transparent, and place a background node
with the appropriate width and height _below_ the HeaderBar in the scene
graph.
On Sat, Nov 16, 2024 at 12:07 AM Andy Goryachev <andy.goryachev at oracle.com>
wrote:
>
>
> I think the Notes-like UI can be implemented using the proposed HeaderBar
> (HB), all one needs to do is to bind the width of the left part in the HB
> to the split pane's divider position, without the need for multiple HB.
>
>
>
> -andy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20241116/2ddff8b8/attachment.htm>
More information about the openjfx-dev
mailing list