RFR: 8313424: JavaFX controls in the title bar [v65]
Michael Strauß
mstrauss at openjdk.org
Thu Apr 24 15:25:05 UTC 2025
On Thu, 24 Apr 2025 15:13:45 GMT, Markus Mack <mmack at openjdk.org> wrote:
>> I think that's also not what it's supposed to mean. The header buttons don't use the color of the scene background directly in their styling. Instead, they use the scene background as a proxy to gauge the color scheme of the entire application (and by extension, the custom header bar), and then use this information to adjust their own styling.
>>
>> In an ideal world, we would probably want to examine the area under the header buttons and find out if light-style or dark-style header buttons should be used. But that is exceedingly complicated and probably not worth the effort.
>
> ok, then my original understanding was correct. Maybe clarify the second sentence like this: "To ensure this works correctly, applications should set the scene fill...". I agree the current implementation is a reasonable way to handle this.
How about this?
* The color scheme of the default header buttons is automatically adjusted to remain easily recognizable
* by inspecting the {@link Scene#fillProperty() Scene.fill} property to gauge the brightness of the user
* interface. Applications should set the scene fill to a color that matches the user interface of the header
* bar area, even if the scene fill is not visible because it is obscured by other controls.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1605#discussion_r2058705791
More information about the openjfx-dev
mailing list