SystemInfo.isMacFullWindowContentSupported now includes isMacOS; updated comments regarding system property apple.awt.application.appearance

This commit is contained in:
Karl Tauber
2023-04-03 10:59:30 +02:00
parent d530624362
commit dce4f4623c
3 changed files with 7 additions and 5 deletions

View File

@@ -113,9 +113,9 @@ public class SystemInfo
// features
// available since Java 12; backported to Java 11.0.8 and 8u292
isMacFullWindowContentSupported =
javaVersion >= toVersion( 11, 0, 8, 0 ) ||
(javaVersion >= toVersion( 1, 8, 0, 292 ) && !isJava_9_orLater);
isMacFullWindowContentSupported = isMacOS &&
(javaVersion >= toVersion( 11, 0, 8, 0 ) ||
(javaVersion >= toVersion( 1, 8, 0, 292 ) && !isJava_9_orLater));
// Note: Keep following at the end of this block because (optional) loading

View File

@@ -55,7 +55,8 @@ public class FlatLafDemo
// - "system": use current macOS appearance (light or dark)
// - "NSAppearanceNameAqua": use light appearance
// - "NSAppearanceNameDarkAqua": use dark appearance
// (needs to be set on main thread; setting it on AWT thread does not work)
// (must be set on main thread and before AWT/Swing is initialized;
// setting it on AWT thread does not work)
System.setProperty( "apple.awt.application.appearance", "system" );
}

View File

@@ -41,7 +41,8 @@ public class FlatLafThemeEditor
// - "system": use current macOS appearance (light or dark)
// - "NSAppearanceNameAqua": use light appearance
// - "NSAppearanceNameDarkAqua": use dark appearance
// (needs to be set on main thread; setting it on AWT thread does not work)
// (must be set on main thread and before AWT/Swing is initialized;
// setting it on AWT thread does not work)
System.setProperty( "apple.awt.application.appearance", "system" );
}