1#
2# $Id$
3#
4# "Clam" theme.
5#
6# Inspired by the XFCE family of Gnome themes.
7#
8
9namespace eval ttk::theme::clam {
10    variable colors
11    array set colors {
12	-disabledfg	"#999999"
13	-frame  	"#dcdad5"
14	-window  	"#ffffff"
15	-dark		"#cfcdc8"
16	-darker 	"#bab5ab"
17	-darkest	"#9e9a91"
18	-lighter	"#eeebe7"
19	-lightest 	"#ffffff"
20	-selectbg	"#4a6984"
21	-selectfg	"#ffffff"
22    }
23
24    ttk::style theme settings clam {
25
26	ttk::style configure "." \
27	    -background $colors(-frame) \
28	    -foreground black \
29	    -bordercolor $colors(-darkest) \
30	    -darkcolor $colors(-dark) \
31	    -lightcolor $colors(-lighter) \
32	    -troughcolor $colors(-darker) \
33	    -selectbackground $colors(-selectbg) \
34	    -selectforeground $colors(-selectfg) \
35	    -selectborderwidth 0 \
36	    -font TkDefaultFont \
37	    ;
38
39	ttk::style map "." \
40	    -background [list disabled $colors(-frame) \
41			     active $colors(-lighter)] \
42	    -foreground [list disabled $colors(-disabledfg)] \
43	    -selectbackground [list  !focus $colors(-darkest)] \
44	    -selectforeground [list  !focus white] \
45	    ;
46	# -selectbackground [list  !focus "#847d73"]
47
48	ttk::style configure TButton \
49	    -anchor center -width -11 -padding 5 -relief raised
50	ttk::style map TButton \
51	    -background [list \
52			     disabled $colors(-frame) \
53			     pressed $colors(-darker) \
54			     active $colors(-lighter)] \
55	    -lightcolor [list pressed $colors(-darker)] \
56	    -darkcolor [list pressed $colors(-darker)] \
57	    -bordercolor [list alternate "#000000"] \
58	    ;
59
60	ttk::style configure Toolbutton \
61	    -anchor center -padding 2 -relief flat
62	ttk::style map Toolbutton \
63	    -relief [list \
64		    disabled flat \
65		    selected sunken \
66		    pressed sunken \
67		    active raised] \
68	    -background [list \
69		    disabled $colors(-frame) \
70		    pressed $colors(-darker) \
71		    active $colors(-lighter)] \
72	    -lightcolor [list pressed $colors(-darker)] \
73	    -darkcolor [list pressed $colors(-darker)] \
74	    ;
75
76	ttk::style configure TCheckbutton \
77	    -indicatorbackground "#ffffff" \
78	    -indicatormargin {1 1 4 1} \
79	    -padding 2 ;
80	ttk::style configure TRadiobutton \
81	    -indicatorbackground "#ffffff" \
82	    -indicatormargin {1 1 4 1} \
83	    -padding 2 ;
84	ttk::style map TCheckbutton -indicatorbackground \
85	    [list  disabled $colors(-frame)  pressed $colors(-frame)]
86	ttk::style map TRadiobutton -indicatorbackground \
87	    [list  disabled $colors(-frame)  pressed $colors(-frame)]
88
89	ttk::style configure TMenubutton \
90	    -width -11 -padding 5 -relief raised
91
92	ttk::style configure TEntry -padding 1 -insertwidth 1
93	ttk::style map TEntry \
94	    -background [list  readonly $colors(-frame)] \
95	    -bordercolor [list  focus $colors(-selectbg)] \
96	    -lightcolor [list  focus "#6f9dc6"] \
97	    -darkcolor [list  focus "#6f9dc6"] \
98	    ;
99
100	ttk::style configure TCombobox -padding 1 -insertwidth 1
101	ttk::style map TCombobox \
102	    -background [list active $colors(-lighter) \
103			     pressed $colors(-lighter)] \
104	    -fieldbackground [list {readonly focus} $colors(-selectbg) \
105				  readonly $colors(-frame)] \
106	    -foreground [list {readonly focus} $colors(-selectfg)] \
107	    ;
108	ttk::style configure ComboboxPopdownFrame \
109	    -relief solid -borderwidth 1
110
111	ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
112	ttk::style map TSpinbox \
113	    -background [list  readonly $colors(-frame)] \
114            -arrowcolor [list disabled $colors(-disabledfg)]
115
116	ttk::style configure TNotebook.Tab -padding {6 2 6 2}
117	ttk::style map TNotebook.Tab \
118	    -padding [list selected {6 4 6 2}] \
119	    -background [list selected $colors(-frame) {} $colors(-darker)] \
120	    -lightcolor [list selected $colors(-lighter) {} $colors(-dark)] \
121	    ;
122
123	# Treeview:
124	ttk::style configure Heading \
125	    -font TkHeadingFont -relief raised -padding {3}
126	ttk::style configure Treeview -background $colors(-window)
127	ttk::style map Treeview \
128	    -background [list selected $colors(-selectbg)] \
129	    -foreground [list selected $colors(-selectfg)] ;
130
131    	ttk::style configure TLabelframe \
132	    -labeloutside true -labelmargins {0 0 0 4} \
133	    -borderwidth 2 -relief raised
134
135	ttk::style configure TProgressbar -background $colors(-frame)
136
137	ttk::style configure Sash -sashthickness 6 -gripcount 10
138    }
139}
140