diff options
author | culler <culler> | 2019-04-19 14:40:07 (GMT) |
---|---|---|
committer | culler <culler> | 2019-04-19 14:40:07 (GMT) |
commit | a4dc7397e54ece7f5b18a85917c0d30b6bf372f0 (patch) | |
tree | 8882e4b08ba744ea5bdb511ec8c1e6013ba9368b /macosx/tkMacOSXWm.c | |
parent | 02c67cd81be2cf32ef9ab8c5a4f130ffd32da6fd (diff) | |
download | tk-a4dc7397e54ece7f5b18a85917c0d30b6bf372f0.zip tk-a4dc7397e54ece7f5b18a85917c0d30b6bf372f0.tar.gz tk-a4dc7397e54ece7f5b18a85917c0d30b6bf372f0.tar.bz2 |
Fine tune aqua ttk colors. Fix availability errors introduced in 6cafd6f7.
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 } /* |