Merge remote-tracking branch 'origin/GP-4973_ryanmkurtz_default-themes'

This commit is contained in:
Ryan Kurtz 2024-10-07 06:30:36 -04:00
commit b8369d242a
2 changed files with 12 additions and 22 deletions

View File

@ -153,16 +153,11 @@ public enum LafType {
*/
public static LafType getDefaultLookAndFeel() {
OperatingSystem OS = Platform.CURRENT_PLATFORM.getOperatingSystem();
switch (OS) {
case MAC_OS_X:
return MAC;
case WINDOWS:
return WINDOWS;
case LINUX:
case UNSUPPORTED:
default:
return NIMBUS;
}
return switch (OS) {
case MAC_OS_X -> MAC;
case WINDOWS -> WINDOWS;
default -> FLAT_LIGHT;
};
}
@Override

View File

@ -616,16 +616,11 @@ public abstract class ThemeManager {
*/
public static GTheme getDefaultTheme() {
OperatingSystem OS = Platform.CURRENT_PLATFORM.getOperatingSystem();
switch (OS) {
case MAC_OS_X:
return new MacTheme();
case WINDOWS:
return new WindowsTheme();
case LINUX:
case UNSUPPORTED:
default:
return new NimbusTheme();
}
return switch (OS) {
case MAC_OS_X -> new MacTheme();
case WINDOWS -> new WindowsTheme();
default -> new FlatLightTheme();
};
}
/**