diff options
author | culler <culler> | 2019-04-18 16:13:18 (GMT) |
---|---|---|
committer | culler <culler> | 2019-04-18 16:13:18 (GMT) |
commit | 2922de7aa8539798cbae60aefd0d7a9cfe35283d (patch) | |
tree | f335b6ffee7f9f54a2ff0be8ede24ee8cf5cc98e /macosx/tkMacOSXWm.c | |
parent | 23928a5f10c089cf05427e29d77b268e60ab7fc6 (diff) | |
download | tk-2922de7aa8539798cbae60aefd0d7a9cfe35283d.zip tk-2922de7aa8539798cbae60aefd0d7a9cfe35283d.tar.gz tk-2922de7aa8539798cbae60aefd0d7a9cfe35283d.tar.bz2 |
Eliminate the confusing conditional code from ttkMacOSXTheme.c.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r-- | macosx/tkMacOSXWm.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index d6456f2..07230bd 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -5927,15 +5927,15 @@ WmWinAppearance( resultString = appearanceStrings[APPEARANCE_AUTO]; } else if (appearance == NSAppearanceNameAqua) { resultString = appearanceStrings[APPEARANCE_AQUA]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 - } else if (appearance == NSAppearanceNameDarkAqua) { - resultString = appearanceStrings[APPEARANCE_DARKAQUA]; -#endif + } else if (@available(macOS 10.14, *)) { + if (appearance == NSAppearanceNameDarkAqua) { + resultString = appearanceStrings[APPEARANCE_DARKAQUA]; + } } else { resultString = "unrecognized"; } #else - resultString = appearanceStrings[APPEARANCE_AQUA]; + resultString = appearanceStrings[APPEARANCE_AQUA]; #endif result = Tcl_NewStringObj(resultString, strlen(resultString)); } @@ -5952,11 +5952,13 @@ WmWinAppearance( switch ((enum appearances) index) { case APPEARANCE_AQUA: win.appearance = [NSAppearance appearanceNamed: - NSAppearanceNameAqua]; + NSAppearanceNameAqua]; break; case APPEARANCE_DARKAQUA: - win.appearance = [NSAppearance appearanceNamed: - NSAppearanceNameDarkAqua]; + if (@available(macOS 10.14, *)) { + win.appearance = [NSAppearance appearanceNamed: + NSAppearanceNameDarkAqua]; + } break; default: win.appearance = nil; |