mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
TextField: avoid garbage in corners if TextComponent.arc is set to a large value
This commit is contained in:
@@ -96,7 +96,7 @@ public class FlatPasswordFieldUI
|
||||
placeholderForeground = UIManager.getColor( prefix + ".placeholderForeground" );
|
||||
capsLockIcon = UIManager.getIcon( "PasswordField.capsLockIcon" );
|
||||
|
||||
LookAndFeel.installProperty( getComponent(), "opaque", focusWidth == 0 );
|
||||
LookAndFeel.installProperty( getComponent(), "opaque", false );
|
||||
|
||||
MigLayoutVisualPadding.install( getComponent(), focusWidth );
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class FlatTextFieldUI
|
||||
isIntelliJTheme = UIManager.getBoolean( "Component.isIntelliJTheme" );
|
||||
placeholderForeground = UIManager.getColor( prefix + ".placeholderForeground" );
|
||||
|
||||
LookAndFeel.installProperty( getComponent(), "opaque", focusWidth == 0 );
|
||||
LookAndFeel.installProperty( getComponent(), "opaque", false );
|
||||
|
||||
MigLayoutVisualPadding.install( getComponent(), focusWidth );
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class FlatTextFieldUI
|
||||
return;
|
||||
|
||||
// fill background if opaque to avoid garbage if user sets opaque to true
|
||||
if( c.isOpaque() && focusWidth > 0 )
|
||||
if( c.isOpaque() && (focusWidth > 0 || arc > 0) )
|
||||
FlatUIUtils.paintParentBackground( g, c );
|
||||
|
||||
// paint background
|
||||
|
||||
Reference in New Issue
Block a user