MenuBar: do not use TitlePane.unifiedBackground if window decorations are disabled for the window

This commit is contained in:
Karl Tauber
2021-04-03 11:51:45 +02:00
parent bbdd7fc2b4
commit de1b0b1bb6

View File

@@ -104,8 +104,9 @@ public class FlatMenuBarUI
// do not paint background for unified title pane
// (not storing value of "TitlePane.unifiedBackground" in class to allow changing at runtime)
if( UIManager.getBoolean( "TitlePane.unifiedBackground" ) )
return false;
if( UIManager.getBoolean( "TitlePane.unifiedBackground" ) &&
FlatNativeWindowBorder.hasCustomDecoration( (Window) rootPane.getParent() ) )
return false;
// paint background in full screen mode
if( FlatUIUtils.isFullScreen( rootPane ) )