Skip to content

Commit

Permalink
fix missing dark mode symbol
Browse files Browse the repository at this point in the history
(cherry picked from commit 737eb59)
  • Loading branch information
PeterPetrik authored and wonder-sk committed Nov 22, 2018
1 parent b49903c commit 7760eea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/native/mac/qgsmacnative.mm
Expand Up @@ -125,14 +125,15 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
if (@available(macOS 10.14, *)) {
// compiled on macos 10.14+ AND running on macos 10.14+
// check the settings of effective appearance of the user
return ( NSApp.effectiveAppearance.name == NSAppearanceNameDarkAqua );
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
return ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]);
} else {
// compiled on macos 10.14+ BUT running on macos 10.13-
// DarkTheme was introduced in MacOS 10.14, fallback to light theme
return false;
}
#endif
// compiled on macos 10.13- AND running anywhere
// compiled on macos 10.13-
// NSAppearanceNameDarkAqua is not in SDK headers
// fallback to light theme
return false;
Expand Down

0 comments on commit 7760eea

Please sign in to comment.