Skip to content
Permalink
Browse files

fix missing dark mode symbol

(cherry picked from commit 737eb59)
  • Loading branch information
PeterPetrik authored and wonder-sk committed Nov 22, 2018
1 parent b49903c commit 7760eead01bb59fd10a66b867c7f01d7d84a7ebb
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/native/mac/qgsmacnative.mm
@@ -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;

0 comments on commit 7760eea

Please sign in to comment.
You can’t perform that action at this time.