I totally agree with the need for better decoration support. I think many JavaFX application developers would agree that one big area where JavaFX is lacking are window decorations, or the lack thereof. Nowadays there are many reasons for having better support/integration for window decorations:

- On Windows, decorations are always in white, even if the system appearance is set to dark. Also if the application is displaying in dark mode while the OS is still in light (all the other way around), the window decorations also do not match up with the application style on other systems like macOS. It would be very useful to have control over the decorations color scheme. Maybe being able to bind a ColorScheme to some kind of native window decorations property would help here.

- Having better custom decorations would also be helpful. Especially when looking into the future on Linux as described here

- Some way to merge the native decorations with the UI as you see in many modern application nowadays would also be nice, but this is not that important as the other points in my opinion

On 23/05/2024 13:16, Thiago Milczarek Sayão wrote:
Hi,

At some point we will need "Client Side" decorations on JavaFX to support modern gnome desktop on Linux as they moved to have client side decorations on everything. Mutter (the gnome compositor) does not even support "server side" decorations. On Wayland it's an extension for KDE only.

Currently, even on Xorg it's a bit hacky when JavaFX needs to set total window size (with decorations). It caused too many problems.

Having controls on the titlebar is a nice feature to have, as seen on many applications (tabs, hamburger menus, buttons).

I'm not exactly sure on how it should be done. Maybe a Scene property that enables its contents to be wrapped in a decoration control?
Would it break applications that walk through the scene graph?

Should it look like Modena and have a JavaFX "identity", or should it try to look like the platform it's in?

On Wayland, it would be possible to use a subcompositor to place the decoration behind, but I think it would be better if the decoration was part of the Scene. It would be less problematic on the variety of compositors (Mutter, Kwin, Sway, etc).


-- Thiago



Reply via email to