Skip to content

Commit 737eb59

Browse files
committed
fix missing dark mode symbol
1 parent 018e9fa commit 737eb59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/native/mac/qgsmacnative.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,15 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
125125
if (@available(macOS 10.14, *)) {
126126
// compiled on macos 10.14+ AND running on macos 10.14+
127127
// check the settings of effective appearance of the user
128-
return ( NSApp.effectiveAppearance.name == NSAppearanceNameDarkAqua );
128+
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
129+
return ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]);
129130
} else {
130131
// compiled on macos 10.14+ BUT running on macos 10.13-
131132
// DarkTheme was introduced in MacOS 10.14, fallback to light theme
132133
return false;
133134
}
134135
#endif
135-
// compiled on macos 10.13- AND running anywhere
136+
// compiled on macos 10.13-
136137
// NSAppearanceNameDarkAqua is not in SDK headers
137138
// fallback to light theme
138139
return false;

0 commit comments

Comments
 (0)