Skip to content
Permalink
Browse files

fix missing dark mode symbol

  • Loading branch information
PeterPetrik committed Nov 13, 2018
1 parent 018e9fa commit 737eb59ed5e2d02c11ff15d599aecb9baf7f09f3
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 737eb59

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