mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -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:
@@ -718,13 +718,11 @@ class DemoFrame
|
||||
|
||||
//---- windowDecorationsCheckBoxMenuItem ----
|
||||
windowDecorationsCheckBoxMenuItem.setText("Window decorations");
|
||||
windowDecorationsCheckBoxMenuItem.setSelected(true);
|
||||
windowDecorationsCheckBoxMenuItem.addActionListener(e -> windowDecorationsChanged());
|
||||
optionsMenu.add(windowDecorationsCheckBoxMenuItem);
|
||||
|
||||
//---- menuBarEmbeddedCheckBoxMenuItem ----
|
||||
menuBarEmbeddedCheckBoxMenuItem.setText("Embedded menu bar");
|
||||
menuBarEmbeddedCheckBoxMenuItem.setSelected(true);
|
||||
menuBarEmbeddedCheckBoxMenuItem.addActionListener(e -> menuBarEmbeddedChanged());
|
||||
optionsMenu.add(menuBarEmbeddedCheckBoxMenuItem);
|
||||
|
||||
@@ -876,6 +874,10 @@ class DemoFrame
|
||||
pasteMenuItem.addActionListener( new DefaultEditorKit.PasteAction() );
|
||||
|
||||
if( FlatLaf.supportsNativeWindowDecorations() ) {
|
||||
windowDecorationsCheckBoxMenuItem.setSelected( FlatLaf.isUseNativeWindowDecorations() );
|
||||
menuBarEmbeddedCheckBoxMenuItem.setSelected( UIManager.getBoolean( "TitlePane.menuBarEmbedded" ) );
|
||||
unifiedTitleBarMenuItem.setSelected( UIManager.getBoolean( "TitlePane.unifiedBackground" ) );
|
||||
|
||||
if( JBRCustomDecorations.isSupported() ) {
|
||||
// If the JetBrains Runtime is used, it forces the use of it's own custom
|
||||
// window decoration, which can not disabled.
|
||||
|
||||
@@ -354,7 +354,6 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) {
|
||||
name: "windowDecorationsCheckBoxMenuItem"
|
||||
"text": "Window decorations"
|
||||
"selected": true
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
@@ -363,7 +362,6 @@ new FormModel {
|
||||
add( new FormComponent( "javax.swing.JCheckBoxMenuItem" ) {
|
||||
name: "menuBarEmbeddedCheckBoxMenuItem"
|
||||
"text": "Embedded menu bar"
|
||||
"selected": true
|
||||
auxiliary() {
|
||||
"JavaCodeGenerator.variableLocal": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user