diff options
author | marc_culler <marc.culler@gmail.com> | 2020-11-15 17:32:15 (GMT) |
---|---|---|
committer | marc_culler <marc.culler@gmail.com> | 2020-11-15 17:32:15 (GMT) |
commit | e7be12248b18066f8c5e2c51d595ca3c88d3254c (patch) | |
tree | 4b2ff3969f04d14ce947b75a8ee91121f1c36b4e | |
parent | 77b05d51020d4aea58e378ebb8dd1991e894d06f (diff) | |
download | tk-e7be12248b18066f8c5e2c51d595ca3c88d3254c.zip tk-e7be12248b18066f8c5e2c51d595ca3c88d3254c.tar.gz tk-e7be12248b18066f8c5e2c51d595ca3c88d3254c.tar.bz2 |
The selected text background issues appeared in 8.6 too. Cherrypick the fix.
-rw-r--r-- | library/ttk/aquaTheme.tcl | 63 | ||||
-rw-r--r-- | macosx/tkMacOSXColor.h | 1 |
2 files changed, 24 insertions, 40 deletions
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 8bba226..51c3e49 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -35,21 +35,38 @@ namespace eval ttk::theme::aqua { ttk::style configure TMenubutton -anchor center -padding {2 0 0 2} ttk::style configure Toolbutton -anchor center + # For Entry, Combobox and Spinbox widgets the selected text background + # is the "Highlight color" selected in preferences when the widget + # has focus. It is a gray color when the widget does not have focus or + # the window does not have focus. (The background state implies !focus + # so we only need to specify !focus.) + # Entry - ttk::style configure TEntry \ - -foreground systemTextColor \ - -background systemTextBackgroundColor ttk::style map TEntry \ -foreground { disabled systemDisabledControlTextColor } \ - -selectforeground { - background systemTextColor + -selectbackground { + !focus systemUnemphasizedSelectedTextBackgroundColor + } + + # Combobox: + ttk::style map TCombobox \ + -foreground { + disabled systemDisabledControlTextColor } \ -selectbackground { - background systemTextBackgroundColor + !focus systemUnemphasizedSelectedTextBackgroundColor } + # Spinbox + ttk::style map TSpinbox \ + -foreground { + disabled systemDisabledControlTextColor + } \ + -selectbackground { + !focus systemUnemphasizedSelectedTextBackgroundColor + } # Workaround for #1100117: # Actually, on Aqua we probably shouldn't stipple images in @@ -67,40 +84,6 @@ namespace eval ttk::theme::aqua { disabled systemDisabledControlTextColor selected systemSelectedTabTextColor} - # Combobox: - ttk::style configure TCombobox \ - -foreground systemTextColor \ - -background systemTransparent - ttk::style map TCombobox \ - -foreground { - disabled systemDisabledControlTextColor - } \ - -selectforeground { - background systemTextColor - } \ - -selectbackground { - background systemTransparent - } - - # Spinbox - ttk::style configure TSpinbox \ - -foreground systemTextColor \ - -background systemTextBackgroundColor \ - -selectforeground systemSelectedTextColor \ - -selectbackground systemSelectedTextBackgroundColor - ttk::style map TSpinbox \ - -foreground { - disabled systemDisabledControlTextColor - } \ - -selectforeground { - !active systemTextColor - } \ - -selectbackground { - !active systemTextBackgroundColor - !focus systemTextBackgroundColor - focus systemSelectedTextBackgroundColor - } - # Treeview: ttk::style configure Heading \ -font TkHeadingFont \ diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h index e27500d..5a57c88 100644 --- a/macosx/tkMacOSXColor.h +++ b/macosx/tkMacOSXColor.h @@ -249,6 +249,7 @@ static SystemColorDatum systemColorData[] = { {"LinkColor", semantic, 0, "blueColor", 0, NULL }, {"PlaceholderTextColor", semantic, 0, "grayColor", 0, NULL }, {"SeparatorColor", semantic, 0, "grayColor", 0, NULL }, +{"UnemphasizedSelectedTextBackgroundColor", semantic, 0, "grayColor", 0, NULL }, {NULL, 0, 0, NULL, 0, NULL } }; |