RFR: 8313424: JavaFX controls in the title bar [v71]

Cormac Redmond duke at openjdk.org
Fri May 2 22:42:00 UTC 2025


On Fri, 2 May 2025 10:32:42 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Implementation of [`StageStyle.EXTENDED`](https://gist.github.com/mstr2/0befc541ee7297b6db2865cc5e4dbd09).
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
> 
>   simplify header area picking

I imagine most people will want HeaderBar's leading node to be an app icon with the usual left-click content menu behaviour (i.e., at least restore, minimise, close), much like it is today.

Today, you can add a bunch of icons to a stage with stage.getIcons().addAll(myLogoList)), and the window's header will contain a suitable icon; never too big, never too small. The developer doesn't worry about it.

I really feel adding an equivalent app icon to the HeaderBar should provided out-of-the-box, using the same logic. E.g., let HeaderBar choose the most suitable, and choose the correct size for the platform. Otherwise, the developer needs to think about it too much again.

A lot of this logic seems to be buried in WindowStage in terms of picking what icons to display in the title bar and when iconified, etc.

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

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


More information about the openjfx-dev mailing list