Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support toolbox-style "small" title bars on Window/Linux, like on MacOS (feature request) #659

Closed
eirikbakke opened this issue Mar 31, 2023 · 9 comments
Milestone

Comments

@eirikbakke
Copy link
Contributor

On MacOS, one can do JRootPane.putClientProperty("Window.style", "small") on a JFrame or JDialog to have the OS draw a more compact title bar, as seen in the "Fields" JDialog in the following screenshot (from Ultorg running with FlatLAF Light):

smalltitle

Apple's original documentation for the "Window.style" client property can be found here.

It would be nice if FlatLAF could make this kind of title bar style work on Windows and Linux as well, for use with toolbox windows and such.

(As an alternative to a client property, there is also Windows.setType(Window.Type.UTILITY), which was probably meant to be used as a hint for this kind of LAF-specific adjustment in window appearance.)

@DevCharly
Copy link
Collaborator

Good idea 👍

@DevCharly
Copy link
Collaborator

@eirikbakke I've now implemented this feature in PR #702

If you want to try it out, pre-built JARs are available in the artifacts of this build:
https://github.com/JFormDesigner/FlatLaf/actions/runs/5706662697

@eirikbakke
Copy link
Contributor Author

Oh, that's brilliant, thanks for implementing that! Will test...

@eirikbakke
Copy link
Contributor Author

Works great in a stand-alone Java app. I tried with JDialog and JFrame, with a non-empty title set, and with both putClientProperty and Windows.setType. Thanks again!

@DevCharly
Copy link
Collaborator

Merged PR #702

@DevCharly DevCharly added this to the 3.2 milestone Aug 5, 2023
@eirikbakke
Copy link
Contributor Author

I see that FlatLAF 3.2 is now released; would you like me to make the "Upgrade FlatLaf from 3.1 to 3.2" PR for NetBeans, following the pattern in apache/netbeans#5818 ?

@DevCharly
Copy link
Collaborator

@eirikbakke that would be great. Thank you. 👍

There is a new DLL in FlatLaf 3.2 for Windows on ARM64. If NB supports this platform, it would be good to also extract this DLL from flatlaf.jar similar to the other DLLs.

@eirikbakke
Copy link
Contributor Author

eirikbakke commented Aug 19, 2023

I had a chance to the Small Title Bar feature on Windows from within my NetBeans Platform app now; it works very nicely:

smalltitle

Tested dragging-to-resize, close button etc. All works well. (I have a few customizations of FlatLaf.properties that make the X button a bit off vertically, but that's on my end, not a FlatLAF thing.)

Thanks again! Next up, will post the NetBeans PR for upgrading the FlatLaf version...

@eirikbakke
Copy link
Contributor Author

I prepared the version bump pull request for NetBeans at apache/netbeans#6362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants