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

Michael Strauß mstrauss at openjdk.org
Thu Apr 24 15:10:10 UTC 2025


On Thu, 24 Apr 2025 14:55:34 GMT, Markus Mack <mmack at openjdk.org> wrote:

>> How a scene background is shown is already described in `Scene.fill`. Note that if we get #1655, we might want to change this part of the specification such that the color scheme of the buttons adjusts to the color scheme of the scene (i.e. `Scene.Preferences.colorScheme`) and not to its background fill.
>
> Ah, so I think I misunderstood this. Maybe change "is adjusted to" to "is adjusted to match" or "is bound to" so it's clear the fill color is used as the background, and not something else based on it. Also, add "elsewhere" after "is not visible" so it's clear the scene fill is actually shown as the button background.

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.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1605#discussion_r2058670814


More information about the openjfx-dev mailing list