diff options
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 18bbf21..8c30fe7 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -5927,11 +5927,12 @@ WmWinAppearance( } else if (appearance == NSAppearanceNameAqua) { resultString = appearanceStrings[APPEARANCE_AQUA]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 - } else if (@available(macOS 10.14, *) && - appearance == NSAppearanceNameDarkAqua) { - resultString = appearanceStrings[APPEARANCE_DARKAQUA]; -#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 + } else if (@available(macOS 10.14, *)) { + if (appearance == NSAppearanceNameDarkAqua) { + resultString = appearanceStrings[APPEARANCE_DARKAQUA]; + } } +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 result = Tcl_NewStringObj(resultString, strlen(resultString)); } if (result == NULL) { @@ -5943,27 +5944,28 @@ WmWinAppearance( sizeof(char *), "appearancename", 0, &index) != TCL_OK) { return TCL_ERROR; } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 switch ((enum appearances) index) { case APPEARANCE_AQUA: win.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua]; break; case APPEARANCE_DARKAQUA: +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 10.14, *)) { win.appearance = [NSAppearance appearanceNamed: NSAppearanceNameDarkAqua]; } +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 break; default: win.appearance = nil; } -#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 } Tcl_SetObjResult(interp, result); return TCL_OK; -#endif // MAC_OS_X_VERSION_MAX_ALLOWED > 1090 +#else // MAC_OS_X_VERSION_MAX_ALLOWED > 1090 return TCL_ERROR; +#endif } /* |