diff options
author | culler <culler> | 2020-06-25 21:12:33 (GMT) |
---|---|---|
committer | culler <culler> | 2020-06-25 21:12:33 (GMT) |
commit | 89f5a6802f0e3aa56d0f612913683dc432646bd0 (patch) | |
tree | 3b069fa04d7791d8c0a83a4c2b35d2719a2d4fd0 /macosx/ttkMacOSXTheme.c | |
parent | dc7625ccd3a00dba6a55b37c190b2cae3b58ea4f (diff) | |
download | tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.zip tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.tar.gz tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.tar.bz2 |
Aqua: replace [NSApp macMinorVersion] by [NSApp macOSVersion] event though the Big Sur (11.1) beta release identifies itself as 10.16.
Diffstat (limited to 'macosx/ttkMacOSXTheme.c')
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 7e8377e..f1b7b8e 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -269,7 +269,7 @@ static void GetBackgroundColor( rgba[i] = masterPtr->privatePtr->fillRGBA[i]; } } else { - if ([NSApp macMinorVersion] > 13) { + if ([NSApp macOSVersion] > 101300) { NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *windowColor = [[NSColor windowBackgroundColor] colorUsingColorSpace: deviceRGB]; @@ -1409,7 +1409,7 @@ static void ButtonElementDraw( } else if (info.kind == kThemePushButton && (state & TTK_STATE_PRESSED)) { bounds.size.height += 2; - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { GradientFillRoundedRectangle(dc.context, bounds, 4, pressedPushButtonGradient, 2); } @@ -1603,7 +1603,7 @@ static void PaneElementDraw( bounds.origin.y -= kThemeMetricTabFrameOverlap; bounds.size.height += kThemeMetricTabFrameOverlap; BEGIN_DRAWING(d) - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { DrawGroupBox(bounds, dc.context, tkwin); } else { HIThemeTabPaneDrawInfo info = { @@ -1662,7 +1662,7 @@ static void GroupElementDraw( CGRect bounds = BoxToRect(d, b); BEGIN_DRAWING(d) - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { DrawGroupBox(bounds, dc.context, tkwin); } else { const HIThemeGroupBoxDrawInfo info = { @@ -1785,7 +1785,7 @@ static void EntryElementDraw( } BEGIN_DRAWING(d) if (backgroundPtr == NULL) { - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { background = [NSColor textBackgroundColor]; CGContextSetFillColorWithColor(dc.context, CGCOLOR(background)); } else { @@ -1863,7 +1863,7 @@ static void ComboboxElementDraw( if (TkMacOSXInDarkMode(tkwin)) { bounds.size.height += 1; DrawDarkButton(bounds, info.kind, state, dc.context); - } else if ([NSApp macMinorVersion] > 8) { + } else if ([NSApp macOSVersion] > 100800) { if ((state & TTK_STATE_BACKGROUND) && !(state & TTK_STATE_DISABLED)) { NSColor *background = [NSColor textBackgroundColor]; @@ -2309,12 +2309,12 @@ static void TroughElementSize( ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &thickness); if (orientation == TTK_ORIENT_HORIZONTAL) { *minHeight = thickness; - if ([NSApp macMinorVersion] > 7) { + if ([NSApp macOSVersion] > 100700) { *paddingPtr = Ttk_MakePadding(4, 4, 4, 3); } } else { *minWidth = thickness; - if ([NSApp macMinorVersion] > 7) { + if ([NSApp macOSVersion] > 100700) { *paddingPtr = Ttk_MakePadding(4, 4, 3, 4); } } @@ -2359,7 +2359,7 @@ static void TroughElementDraw( components: rgba count: 4]; BEGIN_DRAWING(d) - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { CGContextSetFillColorWithColor(dc.context, CGCOLOR(troughColor)); } else { ChkErr(HIThemeSetFill, kThemeBrushDocumentWindowBackground, NULL, @@ -2422,7 +2422,7 @@ static void ThumbElementDraw( * draw the thumb directly. */ - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { CGRect thumbBounds = BoxToRect(d, b); NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *thumbColor; @@ -2482,7 +2482,7 @@ static void ThumbElementDraw( visibleSize = (thumbSize / trackSize) * factor; info.max = factor - visibleSize; info.trackInfo.scrollbar.viewsize = visibleSize; - if ([NSApp macMinorVersion] < 8 || + if ([NSApp macOSVersion] < 100800 || orientation == TTK_ORIENT_HORIZONTAL) { info.value = factor * fraction; } else { @@ -2520,7 +2520,7 @@ static void ArrowElementSize( int *minHeight, Ttk_Padding *paddingPtr) { - if ([NSApp macMinorVersion] < 8) { + if ([NSApp macOSVersion] < 100800) { *minHeight = *minWidth = 14; } else { *minHeight = *minWidth = -1; @@ -2704,7 +2704,7 @@ static void FillElementDraw( { CGRect bounds = BoxToRect(d, b); - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *bgColor; CGFloat fill[4]; @@ -2876,7 +2876,7 @@ static void TreeAreaElementSize ( * widget expects the heading to be the same height as a row. */ - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { paddingPtr->top = 4; } } @@ -2896,7 +2896,7 @@ static void TreeHeaderElementSize( int *minHeight, Ttk_Padding *paddingPtr) { - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { *minHeight = 24; } else { ButtonElementSize(clientData, elementRecord, tkwin, minWidth, @@ -2923,7 +2923,7 @@ static void TreeHeaderElementDraw( }; BEGIN_DRAWING(d) - if ([NSApp macMinorVersion] > 8) { + if ([NSApp macOSVersion] > 100800) { /* * Compensate for the padding added in TreeHeaderElementSize, so |