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

@@ -33,6 +33,8 @@ FlatLaf Change Log
- `2px` at `1.25x` and `2.25x` in **IntelliJ** and **Darcula** themes
- OptionPane: Do not make child components, which are derived from `JPanel`,
non-opaque. (issue #349)
- Window decorations: Window title bar width is no longer considered when
calculating preferred/minimum width of window. (issue #351)
## 1.3

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();