Browse Source

Adjusted preference capabilities depending in macOS version.

pull/139/head
weisj 5 years ago
parent
commit
cb8d4d63dd
  1. 2
      macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java
  2. 5
      macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSThemePreferenceProvider.java

2
macos/src/main/java/com/github/weisj/darklaf/platform/macos/MacOSLibrary.java

@ -47,7 +47,7 @@ public class MacOSLibrary {
private static void loadLibrary() { private static void loadLibrary() {
attemptedLoad = true; attemptedLoad = true;
if (!SystemInfo.isMac || loaded) { if (!SystemInfo.isMacOSYosemite || loaded) {
return; return;
} }
try { try {

5
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 java.util.function.Consumer;
import com.github.weisj.darklaf.theme.info.*; import com.github.weisj.darklaf.theme.info.*;
import com.github.weisj.darklaf.util.SystemInfo;
public class MacOSThemePreferenceProvider implements ThemePreferenceProvider { public class MacOSThemePreferenceProvider implements ThemePreferenceProvider {
@ -92,12 +93,12 @@ public class MacOSThemePreferenceProvider implements ThemePreferenceProvider {
@Override @Override
public boolean supportsNativeAccentColor() { public boolean supportsNativeAccentColor() {
return MacOSLibrary.isLoaded(); return SystemInfo.isMacOSMojave && MacOSLibrary.isLoaded();
} }
@Override @Override
public boolean supportsNativeSelectionColor() { public boolean supportsNativeSelectionColor() {
return MacOSLibrary.isLoaded(); return SystemInfo.isMacOSMojave && MacOSLibrary.isLoaded();
} }
@Override @Override

Loading…
Cancel
Save