On Mon, 28 Oct 2024 09:23:50 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> 
wrote:

> The current behavior is do adapt to Scene background.
> 
> As it does not fit all scenarios, I would not adapt it at all, and provide a 
> way to developers to CSS style the Window Controls overlay.

There are good reasons to adapt the window button theme to the Scene 
background, most importantly because it is easily specified and easily 
documented.

Allowing developers to customize the styling of the window buttons would 
increase the specification surface of this new feature dramatically:
1. We would have to specify the `WindowControlsOverlay` control and its 
substructure, as well as its style classes and pseudoclasses.
2. We would need a new API to set the window buttons stylesheet on a Stage.

I don't think that this is necessarily a bad idea, maybe we should even do that 
in the future. But in the interest of getting this feature across the finish 
line, I think we should keep the scope as small as possible and add more 
features in subsequent enhancements.

In particular, customizing the window buttons stylesheet requires a good way 
for developers to specify different colors for dark and light themes. Currently 
there is no good way to do this purely with CSS. The current implementation 
uses a `dark` style class that is set on the window buttons for dark themes.

However, I really don't want to make this public, because having a `dark` style 
class is not a good solution. There's only one way to do this right, and it is 
with supporting the `prefers-color-scheme` media query.

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

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

Reply via email to