Skip to content
Permalink
Browse files

explicitely check if effectiveApperance is available

(cherry picked from commit a139f8d)
  • Loading branch information
PeterPetrik authored and wonder-sk committed Nov 13, 2018
1 parent a622ce5 commit b7669698b5d7266b719b9370a37e7d66e4b10944
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/native/mac/qgsmacnative.mm
@@ -122,7 +122,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
bool QgsMacNative::hasDarkTheme()
{
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14
if (@available(macOS 10.14, *)) {
if ([NSApp respondsToSelector:@selector(effectiveAppearance)]) {
// compiled on macos 10.14+ AND running on macos 10.14+
// check the settings of effective appearance of the user
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];

0 comments on commit b766969

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