Skip to content

Commit

Permalink
explicitely check if effectiveApperance is available
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Nov 14, 2018
1 parent 674873b commit a139f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/native/mac/qgsmacnative.mm
Expand Up @@ -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]];
Expand Down

0 comments on commit a139f8d

Please sign in to comment.