Window decorations: glass pane no longer overlaps the FlatLaf window title bar (issue #630)

This commit is contained in:
Karl Tauber
2023-01-03 19:48:21 +01:00
parent 4b844353ee
commit 9101324a1f
4 changed files with 42 additions and 4 deletions

View File

@@ -108,6 +108,7 @@ public class FlatInspector
private Window window;
private boolean enabled;
private Object oldGlassPaneFullHeight;
private Component lastComponent;
private int lastX;
private int lastY;
@@ -258,6 +259,14 @@ public class FlatInspector
this.enabled = enabled;
// make sure that glass pane has full height if enabled
if( enabled ) {
oldGlassPaneFullHeight = rootPane.getClientProperty( FlatClientProperties.GLASS_PANE_FULL_HEIGHT );
rootPane.putClientProperty( FlatClientProperties.GLASS_PANE_FULL_HEIGHT, true );
rootPane.validate();
} else
rootPane.putClientProperty( FlatClientProperties.GLASS_PANE_FULL_HEIGHT, oldGlassPaneFullHeight );
// make sure that glass pane is not opaque, which is not the case in WebLaF
((JComponent)rootPane.getGlassPane()).setOpaque( false );