uninstall defaults, but only in non-shared instances

This commit is contained in:
Karl Tauber
2019-08-29 12:20:15 +02:00
parent 77f63e3bdc
commit 03246c440f
2 changed files with 18 additions and 0 deletions

View File

@@ -81,6 +81,16 @@ public class FlatSliderUI
focusColor = UIManager.getColor( "Component.focusColor" );
}
@Override
protected void uninstallDefaults( JSlider slider ) {
super.uninstallDefaults( slider );
trackColor = null;
thumbColor = null;
disabledForeground = null;
focusColor = null;
}
@Override
public Dimension getPreferredHorizontalSize() {
return UIScale.scale( super.getPreferredHorizontalSize() );

View File

@@ -53,6 +53,14 @@ public class FlatTextAreaUI
inactiveBackground = UIManager.getColor( "TextArea.inactiveBackground" );
}
@Override
protected void uninstallDefaults() {
super.uninstallDefaults();
disabledBackground = null;
inactiveBackground = null;
}
@Override
protected void paintBackground( Graphics g ) {
JTextComponent c = getComponent();