moved TestFlatIconNullComponent to other package and fixed file name (issue #483)

This commit is contained in:
Karl Tauber
2022-02-25 15:52:40 +01:00
parent c7fa475128
commit 016e515ae2
3 changed files with 14 additions and 12 deletions

View File

@@ -573,7 +573,10 @@ public class FlatButtonUI
public static Color buttonStateColor( Component c, Color enabledColor, Color disabledColor,
Color focusedColor, Color hoverColor, Color pressedColor )
{
if(c != null && !c.isEnabled() )
if( c == null )
return enabledColor;
if( !c.isEnabled() )
return disabledColor;
if( c instanceof AbstractButton ) {
@@ -586,7 +589,7 @@ public class FlatButtonUI
return hoverColor;
}
if( c != null && focusedColor != null && isFocusPainted( c ) && FlatUIUtils.isPermanentFocusOwner( c ) )
if( focusedColor != null && isFocusPainted( c ) && FlatUIUtils.isPermanentFocusOwner( c ) )
return focusedColor;
return enabledColor;