RFR: 8313424: JavaFX controls in the title bar [v51]
Michael Strauß
mstrauss at openjdk.org
Tue Mar 11 16:41:24 UTC 2025
On Mon, 10 Mar 2025 18:24:30 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> I did find one regression:
>
> On Windows, the toolbar buttons do not initially appear for EXTENDED and EXTENDED_UTILITY. (They seem to re-appear after the focus is lost):
It's working as designed. The reason here is that you didn't include a `HeaderBar` control, which means that the header buttons are not accounted for in layout. In addition to that, the scene background is transparent, which according to `Utils.calculateAverageBrightness(Color.TRANSPARENT)` is a dark color. That means that the glyphs of the header buttons are colored with a contrasting white (due to the "dark" background). This is why the glyphs are barely visible, but become visible when changed to a gray unfocused style.
The fix is to set the scene background to a color that resembles the header bar background (in this case, white). More details are in the `StageStyle.EXTENDED` documentation.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1605#issuecomment-2715015226
More information about the openjfx-dev
mailing list