RFR: 8313424: JavaFX controls in the title bar [v48]
Michael Strauß
mstrauss at openjdk.org
Thu Feb 13 18:45:26 UTC 2025
On Thu, 13 Feb 2025 18:29:08 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> Implementation of [`EXTENDED`](https://gist.github.com/mstr2/0befc541ee7297b6db2865cc5e4dbd09) and `EXTENDED_UTILITY` stage style.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 62 commits:
>
> - Merge branch 'master' into feature/extended-window
> - Remove HeaderBarBase
> - Added HeaderBarBase.prefButtonHeight, removed Stage.initDefaultHeaderButtons
> - add "maximized" pseudo-class for custom maximize button
> - move StageTester to Tools menu
> - macOS bugfixes, default button behavior
> - added StageTester to MonkeyTester
> - small MonkeyTester refactor
> - add samples in MonkeyTester
> - typo
> - ... and 52 more: https://git.openjdk.org/jfx/compare/167e1ee5...00b9be76
I've simplified and fine-tuned the API a bit:
1. `HeaderBarBase` is removed, and its functionality is rolled into `HeaderBar`. The rationale for the base class was that it allows developers to create new header bar implementations, but I now think that it is easier to just use the fully-featured `HeaderBar` class as a starting point, and drop any custom implementation into its `center` slot.
2. `HeaderBar.setPrefHeaderButtonHeight(Stage, double)` is added, which allows applications to explicitly express a preference how tall the header buttons should be. This makes it possible to control the appearance of header buttons (for example, have the header buttons match the height of the title bar).
3. `Stage.initDefaultHeaderButtons()` is removed. Instead, set `HeaderBar.setPrefHeaderButtonHeight` to zero in order to remove the system-provided header buttons.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2657442887
More information about the openjfx-dev
mailing list