mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 23:37:13 -06:00
TextComponents: use focusedBackground also if not editable (but enabled)
(PR #338)
This commit is contained in:
@@ -199,14 +199,14 @@ public class FlatTextFieldUI
|
|||||||
if( !(background instanceof UIResource) )
|
if( !(background instanceof UIResource) )
|
||||||
return background;
|
return background;
|
||||||
|
|
||||||
|
// focused
|
||||||
|
if( focusedBackground != null && FlatUIUtils.isPermanentFocusOwner( c ) )
|
||||||
|
return focusedBackground;
|
||||||
|
|
||||||
// for compatibility with IntelliJ themes
|
// for compatibility with IntelliJ themes
|
||||||
if( isIntelliJTheme && (!c.isEnabled() || !c.isEditable()) )
|
if( isIntelliJTheme && (!c.isEnabled() || !c.isEditable()) )
|
||||||
return FlatUIUtils.getParentBackground( c );
|
return FlatUIUtils.getParentBackground( c );
|
||||||
|
|
||||||
// focused and editable
|
|
||||||
if( focusedBackground != null && c.isEditable() && FlatUIUtils.isPermanentFocusOwner( c ) )
|
|
||||||
return focusedBackground;
|
|
||||||
|
|
||||||
return background;
|
return background;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user