mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-14 07:47:12 -06:00
Merge pull request #68 from basix86/FlatButtonUi
FlatButtonUI getPreferredSize nullPointer fix
This commit is contained in:
@@ -399,6 +399,8 @@ public class FlatButtonUI
|
|||||||
return new Dimension( helpButtonIcon.getIconWidth(), helpButtonIcon.getIconHeight() );
|
return new Dimension( helpButtonIcon.getIconWidth(), helpButtonIcon.getIconHeight() );
|
||||||
|
|
||||||
Dimension prefSize = super.getPreferredSize( c );
|
Dimension prefSize = super.getPreferredSize( c );
|
||||||
|
if ( prefSize == null )
|
||||||
|
return null;
|
||||||
|
|
||||||
// make button square if it is a icon-only button
|
// make button square if it is a icon-only button
|
||||||
// or apply minimum width, if not in toolbar and not a icon-only button
|
// or apply minimum width, if not in toolbar and not a icon-only button
|
||||||
|
|||||||
Reference in New Issue
Block a user