Tk Source Code

Artifact [fd17f276]
Login

Artifact fd17f2763930d62730115f659891183c9cc7dfad:

Attachment "patch3state-default-and-clam.patch" to ticket [3217462f] added by auriocus 2012-11-24 18:03:57.
diff -ruN tk8.6-orig/ttk/clamTheme.tcl tk8.6/ttk/clamTheme.tcl
--- tk8.6-orig/ttk/clamTheme.tcl	2012-11-19 19:33:40.000000000 +0100
+++ tk8.6/ttk/clamTheme.tcl	2012-11-24 11:55:22.000000000 +0100
@@ -17,6 +17,8 @@
 	-lightest 	"#ffffff"
 	-selectbg	"#4a6984"
 	-selectfg	"#ffffff"
+	-altindicator "#9fbdd8"
+	-disabledaltindicator "#c0c0c0"
     }
 
     ttk::style theme settings clam {
@@ -80,9 +82,11 @@
 	    -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 -ruN tk8.6-orig/ttk/defaults.tcl tk8.6/ttk/defaults.tcl
--- tk8.6-orig/ttk/defaults.tcl	2012-11-19 19:33:40.000000000 +0100
+++ tk8.6/ttk/defaults.tcl	2012-11-19 19:51:20.000000000 +0100
@@ -15,6 +15,9 @@
 	-darker 	"#c3c3c3"
 	-disabledfg	"#a3a3a3"
 	-indicator	"#4a6984"
+	-disabledindicator	"#a3a3a3"
+	-altindicator "#9fbdd8"
+	-disabledaltindicator "#c0c0c0"
     }
 
     ttk::style theme settings default {
@@ -45,12 +48,20 @@
 	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"