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 | a2064bd7cfb288a418c1faa377dcea308fe7d351 (patch) | |
tree | 6024c2306c386957e3cb2896914aaa3da4eb1af8 /library/ttk | |
parent | 71040c30eb391126e584a0acccd1562f9759d375 (diff) | |
download | tk-a2064bd7cfb288a418c1faa377dcea308fe7d351.zip tk-a2064bd7cfb288a418c1faa377dcea308fe7d351.tar.gz tk-a2064bd7cfb288a418c1faa377dcea308fe7d351.tar.bz2 |
Tri-state buttons not working for non-native themes. Bug [3217462]
Diffstat (limited to 'library/ttk')
-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" |