diff options
author | culler <culler> | 2019-11-19 04:37:40 (GMT) |
---|---|---|
committer | culler <culler> | 2019-11-19 04:37:40 (GMT) |
commit | 2f99a131694dd03d4a921ca8b048450c1322d48b (patch) | |
tree | 260b51eb56c76a0ed9eac8320f11eaaf87623b37 /macosx | |
parent | 2ce3d02d9581d2f01818b745340b89760bfb987e (diff) | |
parent | 8974b47b859c48701323a72dab851fe81a8cb0d6 (diff) | |
download | tk-2f99a131694dd03d4a921ca8b048450c1322d48b.zip tk-2f99a131694dd03d4a921ca8b048450c1322d48b.tar.gz tk-2f99a131694dd03d4a921ca8b048450c1322d48b.tar.bz2 |
Merge 8.6
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 4 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 17 |
3 files changed, 12 insertions, 11 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 6a4890c..724f637 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -503,7 +503,7 @@ TkMacOSXGetNSImageWithTkImage( { Pixmap pixmap; NSImage *nsImage; - if (width == 0 | height == 0) { + if (width == 0 || height == 0) { return nsImage = [[NSImage alloc] initWithSize:NSMakeSize(0,0)]; } pixmap = Tk_GetPixmap(display, None, width, height, 0); diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index b3c1041..e3aed98 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -293,7 +293,7 @@ static unsigned isFunctionKey(unsigned int code); NSString *str; str = ([aString isKindOfClass: [NSAttributedString class]]) ? - str = [aString string] : aString; + [aString string] : aString; len = [str length]; if (NS_KEYLOG) { @@ -396,7 +396,7 @@ static unsigned isFunctionKey(unsigned int code); NSString *str; str = ([aString isKindOfClass: [NSAttributedString class]]) ? - str = [aString string] : aString; + [aString string] : aString; if (focusWin) { diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 7054d1f..52534ce 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 } |