mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-14 07:47:12 -06:00
Window decorations: no longer reduce height of window title bar if it has an embedded menu bar and is maximized
This commit is contained in:
@@ -14,6 +14,8 @@ FlatLaf Change Log
|
|||||||
- Window title now has a minimum width to always allow moving window
|
- Window title now has a minimum width to always allow moving window
|
||||||
(click-and-drag on window title). Instead, embedded menu bar is made
|
(click-and-drag on window title). Instead, embedded menu bar is made
|
||||||
smaller.
|
smaller.
|
||||||
|
- No longer reduce height of window title bar if it has an embedded menu bar
|
||||||
|
and is maximized.
|
||||||
|
|
||||||
#### Fixed bugs
|
#### Fixed bugs
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ public class FlatTitlePane
|
|||||||
@Override
|
@Override
|
||||||
public Dimension getPreferredSize() {
|
public Dimension getPreferredSize() {
|
||||||
Dimension size = super.getPreferredSize();
|
Dimension size = super.getPreferredSize();
|
||||||
if( buttonMaximizedHeight > 0 && isWindowMaximized() ) {
|
if( buttonMaximizedHeight > 0 && isWindowMaximized() && !hasVisibleEmbeddedMenuBar( rootPane.getJMenuBar() ) ) {
|
||||||
// make title pane height smaller when frame is maximized
|
// make title pane height smaller when frame is maximized
|
||||||
size = new Dimension( size.width, Math.min( size.height, UIScale.scale( buttonMaximizedHeight ) ) );
|
size = new Dimension( size.width, Math.min( size.height, UIScale.scale( buttonMaximizedHeight ) ) );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user