mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 15:00:54 +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() );
|
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
|
@Override
|
||||||
protected void installListeners( JRootPane root ) {
|
protected void installListeners( JRootPane root ) {
|
||||||
super.installListeners( root );
|
super.installListeners( root );
|
||||||
|
|||||||
Reference in New Issue
Block a user