From 3852998b93c968577e0d7d17f57aceb6a2e226af Mon Sep 17 00:00:00 2001 From: culler Date: Wed, 14 Aug 2019 19:49:19 +0000 Subject: Fix some dark mode legibility issues with dialogs and message boxes on macOS. Thanks to Christopher Chavez. --- library/bgerror.tcl | 3 ++- library/dialog.tcl | 5 ----- library/msgbox.tcl | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/library/bgerror.tcl b/library/bgerror.tcl index 574ad8b..fa095f3 100644 --- a/library/bgerror.tcl +++ b/library/bgerror.tcl @@ -21,7 +21,8 @@ namespace eval ::tk::dialog::error { if {[tk windowingsystem] eq "aqua"} { option add *ErrorDialog*background systemAlertBackgroundActive \ widgetDefault - option add *ErrorDialog*info.text.background white widgetDefault + option add *ErrorDialog*info.text.background \ + systemTextBackgroundColor widgetDefault option add *ErrorDialog*Button.highlightBackground \ systemAlertBackgroundActive widgetDefault } diff --git a/library/dialog.tcl b/library/dialog.tcl index c751621..a099d90 100644 --- a/library/dialog.tcl +++ b/library/dialog.tcl @@ -44,11 +44,6 @@ proc ::tk_dialog {w title text bitmap default args} { } set windowingsystem [tk windowingsystem] - if {$windowingsystem eq "aqua"} { - option add *Dialog*background systemDialogBackgroundActive widgetDefault - option add *Dialog*Button.highlightBackground \ - systemDialogBackgroundActive widgetDefault - } # 1. Create the top-level window and divide it into top # and bottom parts. diff --git a/library/msgbox.tcl b/library/msgbox.tcl index 98603af..646c143 100644 --- a/library/msgbox.tcl +++ b/library/msgbox.tcl @@ -164,9 +164,6 @@ proc ::tk::MessageBox {args} { "warning" {set data(-icon) "caution"} "info" {set data(-icon) "note"} } - option add *Dialog*background systemDialogBackgroundActive widgetDefault - option add *Dialog*Button.highlightBackground \ - systemDialogBackgroundActive widgetDefault } if {![winfo exists $data(-parent)]} { -- cgit v0.12