Skip to content

Commit

Permalink
explicitely check if effectiveApperance is available
Browse files Browse the repository at this point in the history
(cherry picked from commit a139f8d)
  • Loading branch information
PeterPetrik authored and wonder-sk committed Nov 22, 2018
1 parent a622ce5 commit b766969
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 b766969

Please sign in to comment.