-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
FlatDarkLaf JButton ignores setMargin() #364
Comments
As Marcel sad, margins are not ignored, but your problem is that buttons in FlatLaf have a minimum width of 72px. myButton.putClientProperty( "JComponent.minimumWidth", 0 ); Or for the whole application: UIManager.put( "Button.minimumWidth", 0 ); |
This question brings me to the idea to not apply minimum button width if button margins are changed... |
@DevCharly Thanks for the minimumWidth tip! |
Starting with FlatLaf 1.5, if button (or text component) margins are modified ( |
I use FlatDarkLaf on my Netbeans application, thanks for this great L&F, it works very well in general :-)
For some specific dialogs I need "small" OK JButtons. The default left/right margins around the text are too large in this case, and I'd like to change them.
myButton.setMargin() works when using the system L&F, but is ignored when using FlatDarkLaf.
I found the FlatLaf properties "Button.margin", I tried setting myButton.putClientProperty("Button.margin", new Insets(...)) but it is ignored as well.
What could I do ?
Thanks
The text was updated successfully, but these errors were encountered: