From b60832afff8d31b3b9d0bba6b1d428a28d4ef45a Mon Sep 17 00:00:00 2001 From: marc_culler Date: Mon, 1 Nov 2021 19:40:31 +0000 Subject: Check and radio buttons. --- macosx/tkMacOSXButton.c | 10 ++++++---- macosx/tkMacOSXColor.c | 2 +- macosx/tkMacOSXDefault.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index b083531..a613a76 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -765,10 +765,12 @@ TkMacOSXDrawButton( * Using a ttk::button would be a much better choice, however. */ - if (TkMacOSXInDarkMode(butPtr->tkwin) && - mbPtr->drawinfo.state != kThemeStatePressed && - !(mbPtr->drawinfo.adornment & kThemeAdornmentDefault)) { - hiinfo.state = kThemeStateInactive; + if ([NSApp macOSVersion] < 120000) { + if (TkMacOSXInDarkMode(butPtr->tkwin) && + mbPtr->drawinfo.state != kThemeStatePressed && + !(mbPtr->drawinfo.adornment & kThemeAdornmentDefault)) { + hiinfo.state = kThemeStateInactive; + } } HIThemeDrawButton(&cntrRect, &hiinfo, dc.context, kHIThemeOrientationNormal, &contHIRec); diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index afb21b2..3951683 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -331,7 +331,7 @@ GetRGBA( colorUsingColorSpace:sRGB]; #endif } else if (entry->index == selectedTabTextIndex) { - if (OSVersion > 100600 && OSVersion < 101600) { + if (OSVersion > 100600 && OSVersion < 110000) { color = [[NSColor whiteColor] colorUsingColorSpace:sRGB]; } else { color = [[NSColor textColor] colorUsingColorSpace:sRGB]; diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index d7dbf8d..3a8eb92 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -70,7 +70,7 @@ #define DEF_BUTTON_DISABLED_FG_MONO "" #define DEF_BUTTON_FG BLACK #define DEF_LABEL_FG NORMAL_FG -#define DEF_CHKRAD_FG DEF_BUTTON_FG +#define DEF_CHKRAD_FG DEF_LABEL_FG #define DEF_BUTTON_FONT "TkDefaultFont" #define DEF_BUTTON_HEIGHT "0" #define DEF_BUTTON_HIGHLIGHT_BG_COLOR DEF_BUTTON_BG_COLOR -- cgit v0.12