mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 23:07:15 -06:00
Window decorations:
- enabled `TitlePane.unifiedBackground` by default (because seems to be standard on Windows 11) - no longer paint a bottom separator for the menu bar (if unified background is enabled)
This commit is contained in:
@@ -53,6 +53,9 @@ public class FlatMenuBarBorder
|
||||
|
||||
@Override
|
||||
public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
|
||||
if( !showBottomSeparator() )
|
||||
return;
|
||||
|
||||
float lineHeight = scale( (float) 1 );
|
||||
FlatUIUtils.paintFilledRectangle( g, borderColor, x, y + height - lineHeight, width, lineHeight );
|
||||
}
|
||||
@@ -68,4 +71,9 @@ public class FlatMenuBarBorder
|
||||
insets.right = scale( margin.right );
|
||||
return insets;
|
||||
}
|
||||
|
||||
/** @since 2 */
|
||||
protected boolean showBottomSeparator() {
|
||||
return !UIManager.getBoolean( "TitlePane.unifiedBackground" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ TitledBorder.border = 1,1,1,1,$Separator.foreground
|
||||
|
||||
TitlePane.useWindowDecorations = true
|
||||
TitlePane.menuBarEmbedded = true
|
||||
TitlePane.unifiedBackground = false
|
||||
TitlePane.unifiedBackground = true
|
||||
TitlePane.showIcon = true
|
||||
TitlePane.noIconLeftGap = 8
|
||||
TitlePane.iconSize = 16,16
|
||||
|
||||
Reference in New Issue
Block a user