Skip to content

Commit b766969

Browse files
PeterPetrikwonder-sk
authored andcommitted
explicitely check if effectiveApperance is available
(cherry picked from commit a139f8d)
1 parent a622ce5 commit b766969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/native/mac/qgsmacnative.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
122122
bool QgsMacNative::hasDarkTheme()
123123
{
124124
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14
125-
if (@available(macOS 10.14, *)) {
125+
if ([NSApp respondsToSelector:@selector(effectiveAppearance)]) {
126126
// compiled on macos 10.14+ AND running on macos 10.14+
127127
// check the settings of effective appearance of the user
128128
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];

0 commit comments

Comments
 (0)