mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
macOS: use native screen menu bar if system property apple.laf.useScreenMenuBar is true
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
FlatLaf Change Log
|
FlatLaf Change Log
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
- macOS: Use native screen menu bar if system property
|
||||||
|
`apple.laf.useScreenMenuBar` is `true`.
|
||||||
|
|
||||||
|
|
||||||
## 0.11
|
## 0.11
|
||||||
|
|
||||||
- Changed Maven groupId to `com.formdev` and artifactId to `flatlaf`.
|
- Changed Maven groupId to `com.formdev` and artifactId to `flatlaf`.
|
||||||
|
|||||||
@@ -157,9 +157,17 @@ public abstract class FlatLaf
|
|||||||
defaults.put( "Spinner.disabledBackground", control );
|
defaults.put( "Spinner.disabledBackground", control );
|
||||||
defaults.put( "Spinner.disabledForeground", control );
|
defaults.put( "Spinner.disabledForeground", control );
|
||||||
|
|
||||||
|
// remember MenuBarUI from Mac Aqua LaF if Mac screen menubar is enabled
|
||||||
|
boolean useScreenMenuBar = SystemInfo.IS_MAC && "true".equals( System.getProperty( "apple.laf.useScreenMenuBar" ) );
|
||||||
|
Object aquaMenuBarUI = useScreenMenuBar ? defaults.get( "MenuBarUI" ) : null;
|
||||||
|
|
||||||
initFonts( defaults );
|
initFonts( defaults );
|
||||||
loadDefaultsFromProperties( defaults );
|
loadDefaultsFromProperties( defaults );
|
||||||
|
|
||||||
|
// use Aqua MenuBarUI if Mac screen menubar is enabled
|
||||||
|
if( useScreenMenuBar )
|
||||||
|
defaults.put( "MenuBarUI", aquaMenuBarUI );
|
||||||
|
|
||||||
return defaults;
|
return defaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user