Styling: clear field oldStyleValues on UI delegate uninstall

This commit is contained in:
Karl Tauber
2021-06-21 21:06:39 +02:00
parent 0c51dfe19c
commit 82192bef91
15 changed files with 31 additions and 0 deletions

View File

@@ -220,6 +220,8 @@ public class FlatButtonUI
protected void uninstallDefaults( AbstractButton b ) { protected void uninstallDefaults( AbstractButton b ) {
super.uninstallDefaults( b ); super.uninstallDefaults( b );
oldStyleValues = null;
MigLayoutVisualPadding.uninstall( b ); MigLayoutVisualPadding.uninstall( b );
defaults_initialized = false; defaults_initialized = false;
} }

View File

@@ -86,6 +86,7 @@ public class FlatCheckBoxMenuItemUI
super.uninstallDefaults(); super.uninstallDefaults();
renderer = null; renderer = null;
oldStyleValues = null;
} }
protected FlatMenuItemRenderer createRenderer() { protected FlatMenuItemRenderer createRenderer() {

View File

@@ -118,6 +118,8 @@ public class FlatEditorPaneUI
oldDisabledBackground = null; oldDisabledBackground = null;
oldInactiveBackground = null; oldInactiveBackground = null;
oldStyleValues = null;
getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties ); getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties );
} }

View File

@@ -86,6 +86,7 @@ public class FlatMenuItemUI
super.uninstallDefaults(); super.uninstallDefaults();
renderer = null; renderer = null;
oldStyleValues = null;
} }
protected FlatMenuItemRenderer createRenderer() { protected FlatMenuItemRenderer createRenderer() {

View File

@@ -109,6 +109,7 @@ public class FlatMenuUI
hoverBackground = null; hoverBackground = null;
renderer = null; renderer = null;
oldStyleValues = null;
} }
protected FlatMenuItemRenderer createRenderer() { protected FlatMenuItemRenderer createRenderer() {

View File

@@ -140,6 +140,8 @@ public class FlatPasswordFieldUI
oldDisabledBackground = null; oldDisabledBackground = null;
oldInactiveBackground = null; oldInactiveBackground = null;
oldStyleValues = null;
MigLayoutVisualPadding.uninstall( getComponent() ); MigLayoutVisualPadding.uninstall( getComponent() );
} }

View File

@@ -90,6 +90,13 @@ public class FlatProgressBarUI
verticalSize = UIManager.getDimension( "ProgressBar.verticalSize" ); verticalSize = UIManager.getDimension( "ProgressBar.verticalSize" );
} }
@Override
protected void uninstallDefaults() {
super.uninstallDefaults();
oldStyleValues = null;
}
@Override @Override
protected void installListeners() { protected void installListeners() {
super.installListeners(); super.installListeners();

View File

@@ -86,6 +86,7 @@ public class FlatRadioButtonMenuItemUI
super.uninstallDefaults(); super.uninstallDefaults();
renderer = null; renderer = null;
oldStyleValues = null;
} }
protected FlatMenuItemRenderer createRenderer() { protected FlatMenuItemRenderer createRenderer() {

View File

@@ -117,6 +117,8 @@ public class FlatRadioButtonUI
protected void uninstallDefaults( AbstractButton b ) { protected void uninstallDefaults( AbstractButton b ) {
super.uninstallDefaults( b ); super.uninstallDefaults( b );
oldStyleValues = null;
MigLayoutVisualPadding.uninstall( b ); MigLayoutVisualPadding.uninstall( b );
defaults_initialized = false; defaults_initialized = false;
} }

View File

@@ -179,6 +179,8 @@ public class FlatScrollBarUI
buttonDisabledArrowColor = null; buttonDisabledArrowColor = null;
hoverButtonBackground = null; hoverButtonBackground = null;
pressedButtonBackground = null; pressedButtonBackground = null;
oldStyleValues = null;
} }
@Override @Override

View File

@@ -99,7 +99,9 @@ public class FlatSeparatorUI
@Override @Override
protected void uninstallDefaults( JSeparator s ) { protected void uninstallDefaults( JSeparator s ) {
super.uninstallDefaults( s ); super.uninstallDefaults( s );
defaults_initialized = false; defaults_initialized = false;
oldStyleValues = null;
} }
@Override @Override

View File

@@ -110,6 +110,8 @@ public class FlatSplitPaneUI
oneTouchArrowColor = null; oneTouchArrowColor = null;
oneTouchHoverArrowColor = null; oneTouchHoverArrowColor = null;
oneTouchPressedArrowColor = null; oneTouchPressedArrowColor = null;
oldStyleValues = null;
} }
@Override @Override

View File

@@ -107,6 +107,8 @@ public class FlatTextAreaUI
oldDisabledBackground = null; oldDisabledBackground = null;
oldInactiveBackground = null; oldInactiveBackground = null;
oldStyleValues = null;
} }
@Override @Override

View File

@@ -135,6 +135,8 @@ public class FlatTextFieldUI
oldDisabledBackground = null; oldDisabledBackground = null;
oldInactiveBackground = null; oldInactiveBackground = null;
oldStyleValues = null;
MigLayoutVisualPadding.uninstall( getComponent() ); MigLayoutVisualPadding.uninstall( getComponent() );
} }

View File

@@ -114,6 +114,8 @@ public class FlatTextPaneUI
oldDisabledBackground = null; oldDisabledBackground = null;
oldInactiveBackground = null; oldInactiveBackground = null;
oldStyleValues = null;
getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties ); getComponent().putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, oldHonorDisplayProperties );
} }