From cb8d4d63ddf851859a7b97ab062c53403bba00d8 Mon Sep 17 00:00:00 2001 From: weisj Date: Sun, 19 Apr 2020 10:11:26 +0200 Subject: [PATCH] Adjusted preference capabilities depending in macOS version. --- .../github/weisj/darklaf/platform/macos/MacOSLibrary.java | 2 +- .../darklaf/platform/macos/MacOSThemePreferenceProvider.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java b/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java index 15ebecb1..cd2da16a 100644 --- a/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java +++ b/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java @@ -47,7 +47,7 @@ public class MacOSLibrary { private static void loadLibrary() { attemptedLoad = true; - if (!SystemInfo.isMac || loaded) { + if (!SystemInfo.isMacOSYosemite || loaded) { return; } try { diff --git a/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSThemePreferenceProvider.java b/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSThemePreferenceProvider.java index de651701..eeb86a15 100644 --- a/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSThemePreferenceProvider.java +++ b/macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSThemePreferenceProvider.java @@ -28,6 +28,7 @@ import java.awt.*; import java.util.function.Consumer; import com.github.weisj.darklaf.theme.info.*; +import com.github.weisj.darklaf.util.SystemInfo; public class MacOSThemePreferenceProvider implements ThemePreferenceProvider { @@ -92,12 +93,12 @@ public class MacOSThemePreferenceProvider implements ThemePreferenceProvider { @Override public boolean supportsNativeAccentColor() { - return MacOSLibrary.isLoaded(); + return SystemInfo.isMacOSMojave && MacOSLibrary.isLoaded(); } @Override public boolean supportsNativeSelectionColor() { - return MacOSLibrary.isLoaded(); + return SystemInfo.isMacOSMojave && MacOSLibrary.isLoaded(); } @Override