Window decorations: window title bar width is no longer considered when calculating preferred/minimum width of window (issue #351)

This commit is contained in:
Karl Tauber
2021-07-08 16:54:34 +02:00
parent 87407ca832
commit 266a546478
2 changed files with 3 additions and 1 deletions

View File

@@ -342,7 +342,7 @@ public class FlatRootPaneUI
? getSizeFunc.apply( rootPane.getContentPane() )
: rootPane.getSize();
int width = Math.max( titlePaneSize.width, contentSize.width );
int width = contentSize.width; // title pane width is not considered here
int height = titlePaneSize.height + contentSize.height;
if( titlePane == null || !titlePane.isMenuBarEmbedded() ) {
JMenuBar menuBar = rootPane.getJMenuBar();