FlatLaf
FlatLaf copied to clipboard
Customizable title bar
Hi, the custom titlebar is great but it really needs a way to optionally hide the maximize/restore button, hide the iconify button, hide the title in titlebar, make the window not draggable and set the titlebar background color manually or change just a single window's background color.
These are very important features to be able to make ANY kind of window with any kind of functionality that might be needed! For now I'm trying to find workarounds to this limitation, but is very clunky, not efficient, and not stable...
I've created PR #613 to work on title bar improvements.
Currently it implements hiding of window title and iconify/maximize/close buttons.
make the window not draggable
Why is this needed? Then the user can not move the window 😕
set the titlebar background color manually
This is possible since FlatLaf 1.1.2 See https://www.formdev.com/flatlaf/client-properties/#JRootPane.titleBarBackground
or change just a single window's background color
Not sure what you mean by that 😕
I also plan to add a "fullWindowContent" option that extends the content pane into the title. (similar to macOS https://www.formdev.com/flatlaf/macos/#full_window_content) Then it is possible to place any components at the top of the window, but still be able to move the window and minimize/maximize/close it.
I wonder what you plan for your app? Can you share some layout mockup?
make the window not draggable
Why is this needed? Then the user can not move the window 😕
For some special dialogs, or in my case, I have a small window that loads the app & resources, checks for updates and so on, and I need it to be not draggable in certain moments and only have the minimize and close buttons.
set the titlebar background color manually
This is possible since FlatLaf 1.1.2 See https://www.formdev.com/flatlaf/client-properties/#JRootPane.titleBarBackground
aha, I completely missed that, sorry 😕
or change just a single window's background color
Not sure what you mean by that 😕
changing the titlebar background color suffices, i was looking for a way to have different window (and titlebar) background colors for different jframes...
I also plan to add a "fullWindowContent" option that extends the content pane into the title. (similar to macOS https://www.formdev.com/flatlaf/macos/#full_window_content) Then it is possible to place any components at the top of the window, but still be able to move the window and minimize/maximize/close it.
This would be perfect, it would allow an amazing deal of customization!
I wonder what you plan for your app? Can you share some layout mockup?
Sure, this is the mock-up of the current app launcher/updater. It still needs some tweaking but the concept is there...
I also plan to add a "fullWindowContent" option that extends the content pane into the title.
(similar to macOS https://www.formdev.com/flatlaf/macos/#full_window_content)
Is it in version 3.0? Looking forward to it very much.🎉
See PR #801