TextComponents: use focusedBackground also if not editable (but enabled)

(PR #338)
This commit is contained in:
Karl Tauber
2021-06-30 00:01:33 +02:00
parent 511dd02107
commit 98b156bdde

View File

@@ -199,14 +199,14 @@ public class FlatTextFieldUI
if( !(background instanceof UIResource) )
return background;
// focused
if( focusedBackground != null && FlatUIUtils.isPermanentFocusOwner( c ) )
return focusedBackground;
// for compatibility with IntelliJ themes
if( isIntelliJTheme && (!c.isEnabled() || !c.isEditable()) )
return FlatUIUtils.getParentBackground( c );
// focused and editable
if( focusedBackground != null && c.isEditable() && FlatUIUtils.isPermanentFocusOwner( c ) )
return focusedBackground;
return background;
}