mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 00:07:12 -06:00
Window decorations: hide window icon if InternalFrame.icon is null or its width or height is zero
This commit is contained in:
@@ -284,6 +284,8 @@ public class FlatTitlePane
|
|||||||
else {
|
else {
|
||||||
// no icon set on window --> use default icon
|
// no icon set on window --> use default icon
|
||||||
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
|
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
|
||||||
|
if( defaultIcon != null && (defaultIcon.getIconWidth() == 0 || defaultIcon.getIconHeight() == 0) )
|
||||||
|
defaultIcon = null;
|
||||||
if( defaultIcon != null ) {
|
if( defaultIcon != null ) {
|
||||||
if( defaultIcon instanceof ImageIcon )
|
if( defaultIcon instanceof ImageIcon )
|
||||||
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );
|
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );
|
||||||
|
|||||||
Reference in New Issue
Block a user