Skip to content
Permalink
Browse files

explicitely check if effectiveApperance is available

  • Loading branch information
PeterPetrik committed Nov 13, 2018
1 parent 674873b commit a139f8d6fc0b1baaaef57585ef885e3be9424da2
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 a139f8d

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