mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
--- src/adw-settings-impl-macos.c 2024-05-24 13:03:30.000000000 +0800
|
|
+++ src/adw-settings-impl-macos.c 2024-06-10 07:43:01.000000000 +0800
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include "adw-settings-impl-private.h"
|
|
|
|
+#include <AvailabilityMacros.h>
|
|
#include <AppKit/AppKit.h>
|
|
|
|
struct _AdwSettingsImplMacOS
|
|
@@ -41,6 +42,7 @@
|
|
static AdwSystemColorScheme
|
|
get_ns_color_scheme (void)
|
|
{
|
|
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
|
if (@available(*, macOS 10.14)) {
|
|
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
|
NSString *style = [userDefaults stringForKey:@"AppleInterfaceStyle"];
|
|
@@ -61,7 +63,7 @@
|
|
ADW_SYSTEM_COLOR_SCHEME_PREFER_DARK :
|
|
ADW_SYSTEM_COLOR_SCHEME_DEFAULT;
|
|
}
|
|
-
|
|
+#endif
|
|
return ADW_SYSTEM_COLOR_SCHEME_DEFAULT;
|
|
}
|
|
|
|
@@ -90,7 +92,7 @@
|
|
|
|
if (!enable_color_scheme)
|
|
return ADW_SETTINGS_IMPL (self);
|
|
-
|
|
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
|
|
if (@available(*, macOS 10.14)) {
|
|
static ThemeChangedObserver *observer;
|
|
|
|
@@ -108,6 +110,6 @@
|
|
/* has_color_scheme */ TRUE,
|
|
/* has_high_contrast */ FALSE);
|
|
}
|
|
-
|
|
+#endif
|
|
return ADW_SETTINGS_IMPL (self);
|
|
}
|