diff options
author | culler <culler> | 2019-11-19 00:46:50 (GMT) |
---|---|---|
committer | culler <culler> | 2019-11-19 00:46:50 (GMT) |
commit | 8974b47b859c48701323a72dab851fe81a8cb0d6 (patch) | |
tree | 1b3e0fa93c9116280cdd13154a20fbe1cfcdb1bd /macosx/ttkMacOSXTheme.c | |
parent | f3e045cc474203fdfb1a77892eadfba33275509c (diff) | |
download | tk-8974b47b859c48701323a72dab851fe81a8cb0d6.zip tk-8974b47b859c48701323a72dab851fe81a8cb0d6.tar.gz tk-8974b47b859c48701323a72dab851fe81a8cb0d6.tar.bz2 |
Correct some errors revealed by building on macOS 10.6
Diffstat (limited to 'macosx/ttkMacOSXTheme.c')
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 952aa20..7e8377e 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1409,8 +1409,10 @@ static void ButtonElementDraw( } else if (info.kind == kThemePushButton && (state & TTK_STATE_PRESSED)) { bounds.size.height += 2; - GradientFillRoundedRectangle(dc.context, bounds, 4, - pressedPushButtonGradient, 2); + if ([NSApp macMinorVersion] > 8) { + GradientFillRoundedRectangle(dc.context, bounds, 4, + pressedPushButtonGradient, 2); + } } else { /* @@ -1859,18 +1861,17 @@ static void ComboboxElementDraw( BEGIN_DRAWING(d) bounds.origin.y += 1; if (TkMacOSXInDarkMode(tkwin)) { - bounds.size.height += 1; + bounds.size.height += 1; DrawDarkButton(bounds, info.kind, state, dc.context); - } else if ([NSApp macMinorVersion] > 8) { - if ((state & TTK_STATE_BACKGROUND) && - !(state & TTK_STATE_DISABLED)) { + } else if ([NSApp macMinorVersion] > 8) { + if ((state & TTK_STATE_BACKGROUND) && + !(state & TTK_STATE_DISABLED)) { NSColor *background = [NSColor textBackgroundColor]; CGRect innerBounds = CGRectInset(bounds, 1, 2); SolidFillRoundedRectangle(dc.context, innerBounds, 4, background); } - ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, - NULL); } + ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); END_DRAWING } |