Window decorations: support enabling/disabling unified title bar backgrounds at runtime without FlatLaf.updateUI()

This commit is contained in:
Karl Tauber
2021-03-30 01:34:34 +02:00
parent 7a2d0e7fcb
commit 1b5da0e1d1
4 changed files with 8 additions and 10 deletions

View File

@@ -25,7 +25,6 @@ import java.util.List;
import java.util.Random;
import javax.swing.*;
import com.formdev.flatlaf.FlatClientProperties;
import com.formdev.flatlaf.FlatLaf;
import net.miginfocom.swing.*;
/**
@@ -112,7 +111,9 @@ public class FlatWindowDecorationsTest
private void unifiedBackgroundChanged() {
UIManager.put( "TitlePane.unifiedBackground", unifiedBackgroundCheckBox.isSelected() );
FlatLaf.updateUI();
Window window = SwingUtilities.windowForComponent( this );
if( window != null )
window.repaint();
}
private void menuBarChanged() {