mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27: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) )
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user