summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2021-11-01 19:40:31 (GMT)
committermarc_culler <marc.culler@gmail.com>2021-11-01 19:40:31 (GMT)
commitb60832afff8d31b3b9d0bba6b1d428a28d4ef45a (patch)
treead514831008f3aa1429a5b27741e74cfc33183b4
parent06ca271c828bc7df25dfba6698246b15def3a28e (diff)
downloadtk-b60832afff8d31b3b9d0bba6b1d428a28d4ef45a.zip
tk-b60832afff8d31b3b9d0bba6b1d428a28d4ef45a.tar.gz
tk-b60832afff8d31b3b9d0bba6b1d428a28d4ef45a.tar.bz2
Check and radio buttons.
-rw-r--r--macosx/tkMacOSXButton.c10
-rw-r--r--macosx/tkMacOSXColor.c2
-rw-r--r--macosx/tkMacOSXDefault.h2
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