diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2016-09-21 08:31:16 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2016-09-21 08:31:16 (GMT) |
commit | 3da9b75d3711e0538834813e7246990dff8e8c3a (patch) | |
tree | 6024c2306c386957e3cb2896914aaa3da4eb1af8 | |
parent | b5deacd1f7c7553a45b73fffe25053df18895a8c (diff) | |
download | tk-3da9b75d3711e0538834813e7246990dff8e8c3a.zip tk-3da9b75d3711e0538834813e7246990dff8e8c3a.tar.gz tk-3da9b75d3711e0538834813e7246990dff8e8c3a.tar.bz2 |
Tri-state buttons not working for non-native themes. Bug [3217462]
-rw-r--r-- | library/ttk/clamTheme.tcl | 8 | ||||
-rw-r--r-- | library/ttk/defaults.tcl | 15 |
2 files changed, 19 insertions, 4 deletions
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl index f184ea0..398a524 100644 --- a/library/ttk/clamTheme.tcl +++ b/library/ttk/clamTheme.tcl @@ -17,6 +17,8 @@ namespace eval ttk::theme::clam { -lightest "#ffffff" -selectbg "#4a6984" -selectfg "#ffffff" + -altindicator "#9fbdd8" + -disabledaltindicator "#c0c0c0" } ttk::style theme settings clam { @@ -80,9 +82,11 @@ namespace eval ttk::theme::clam { -indicatormargin {1 1 4 1} \ -padding 2 ; ttk::style map TCheckbutton -indicatorbackground \ - [list disabled $colors(-frame) pressed $colors(-frame)] + [list disabled $colors(-frame) pressed $colors(-frame) \ + {!disabled alternate} $colors(-altindicator) {disabled alternate} $colors(-disabledaltindicator)] ttk::style map TRadiobutton -indicatorbackground \ - [list disabled $colors(-frame) pressed $colors(-frame)] + [list disabled $colors(-frame) pressed $colors(-frame) \ + {!disabled alternate} $colors(-altindicator) {disabled alternate} $colors(-disabledaltindicator)] ttk::style configure TMenubutton \ -width -11 -padding 5 -relief raised diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl index 05a46bd..2ab6c9c 100644 --- a/library/ttk/defaults.tcl +++ b/library/ttk/defaults.tcl @@ -15,6 +15,9 @@ namespace eval ttk::theme::default { -darker "#c3c3c3" -disabledfg "#a3a3a3" -indicator "#4a6984" + -disabledindicator "#a3a3a3" + -altindicator "#9fbdd8" + -disabledaltindicator "#c0c0c0" } ttk::style theme settings default { @@ -45,12 +48,20 @@ namespace eval ttk::theme::default { ttk::style configure TCheckbutton \ -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1 ttk::style map TCheckbutton -indicatorcolor \ - [list pressed $colors(-activebg) selected $colors(-indicator)] + [list pressed $colors(-activebg) \ + {!disabled selected} $colors(-indicator) {disabled selected} $colors(-disabledindicator) \ + {!disabled alternate} $colors(-altindicator) {disabled alternate} $colors(-disabledaltindicator)] + ttk::style map TCheckbutton -indicatorrelief \ + [list alternate raised] ttk::style configure TRadiobutton \ -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1 ttk::style map TRadiobutton -indicatorcolor \ - [list pressed $colors(-activebg) selected $colors(-indicator)] + [list pressed $colors(-activebg) \ + {!disabled selected} $colors(-indicator) {disabled selected} $colors(-disabledindicator) \ + {!disabled alternate} $colors(-altindicator) {disabled alternate} $colors(-disabledaltindicator)] + ttk::style map TRadiobutton -indicatorrelief \ + [list alternate raised] ttk::style configure TMenubutton \ -relief raised -padding "10 3" |