mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 14:30:56 +03:00
RootPane: uninstall background, foreground and font because not all Lafs set them
This commit is contained in:
@@ -161,6 +161,19 @@ public class FlatRootPaneUI
|
||||
c.putClientProperty( "jetbrains.awt.windowDarkAppearance", FlatLaf.isLafDark() );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void uninstallDefaults( JRootPane c ) {
|
||||
super.uninstallDefaults( c );
|
||||
|
||||
// uninstall background, foreground and font because not all Lafs set them
|
||||
if( c.isBackgroundSet() && c.getBackground() instanceof UIResource )
|
||||
c.setBackground( null );
|
||||
if( c.isForegroundSet() && c.getForeground() instanceof UIResource )
|
||||
c.setForeground( null );
|
||||
if( c.isFontSet() && c.getFont() instanceof UIResource )
|
||||
c.setFont( null );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void installListeners( JRootPane root ) {
|
||||
super.installListeners( root );
|
||||
|
||||
Reference in New Issue
Block a user