Window decorations: hide window icon if InternalFrame.icon is null or its width or height is zero

This commit is contained in:
Karl Tauber
2020-07-06 14:45:52 +02:00
parent f22862b0a4
commit 468c66e842

View File

@@ -284,6 +284,8 @@ public class FlatTitlePane
else {
// no icon set on window --> use default icon
Icon defaultIcon = UIManager.getIcon( "InternalFrame.icon" );
if( defaultIcon != null && (defaultIcon.getIconWidth() == 0 || defaultIcon.getIconHeight() == 0) )
defaultIcon = null;
if( defaultIcon != null ) {
if( defaultIcon instanceof ImageIcon )
defaultIcon = new ScaledImageIcon( (ImageIcon) defaultIcon, iconSize.width, iconSize.height );