Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix missing dark mode symbol
  • Loading branch information
PeterPetrik committed Nov 14, 2018
1 parent 018e9fa commit 737eb59
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 737eb59

Please sign in to comment.