1#
2# Settings for default theme.
3#
4
5namespace eval ttk::theme::default {
6    variable colors
7    array set colors {
8	-frame		"#d9d9d9"
9	-foreground	"#000000"
10	-window		"#ffffff"
11	-text   	"#000000"
12	-activebg	"#ececec"
13	-selectbg	"#4a6984"
14	-selectfg	"#ffffff"
15	-darker 	"#c3c3c3"
16	-disabledfg	"#a3a3a3"
17	-indicator	"#4a6984"
18    }
19
20    ttk::style theme settings default {
21
22	ttk::style configure "." \
23	    -borderwidth 	1 \
24	    -background 	$colors(-frame) \
25	    -foreground 	$colors(-foreground) \
26	    -troughcolor 	$colors(-darker) \
27	    -font 		TkDefaultFont \
28	    -selectborderwidth	1 \
29	    -selectbackground	$colors(-selectbg) \
30	    -selectforeground	$colors(-selectfg) \
31	    -insertwidth 	1 \
32	    -indicatordiameter	10 \
33	    ;
34
35	ttk::style map "." -background \
36	    [list disabled $colors(-frame)  active $colors(-activebg)]
37	ttk::style map "." -foreground \
38	    [list disabled $colors(-disabledfg)]
39
40	ttk::style configure TButton \
41	    -anchor center -padding "3 3" -width -9 \
42	    -relief raised -shiftrelief 1
43	ttk::style map TButton -relief [list {!disabled pressed} sunken]
44
45	ttk::style configure TCheckbutton \
46	    -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
47	ttk::style map TCheckbutton -indicatorcolor \
48	    [list pressed $colors(-activebg)  selected $colors(-indicator)]
49
50	ttk::style configure TRadiobutton \
51	    -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
52	ttk::style map TRadiobutton -indicatorcolor \
53	    [list pressed $colors(-activebg)  selected $colors(-indicator)]
54
55	ttk::style configure TMenubutton \
56	    -relief raised -padding "10 3"
57
58	ttk::style configure TEntry \
59	    -relief sunken -fieldbackground white -padding 1
60	ttk::style map TEntry -fieldbackground \
61	    [list readonly $colors(-frame) disabled $colors(-frame)]
62
63	ttk::style configure TCombobox -arrowsize 12 -padding 1
64	ttk::style map TCombobox -fieldbackground \
65	    [list readonly $colors(-frame) disabled $colors(-frame)]
66
67	ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
68	ttk::style map TSpinbox -fieldbackground \
69	    [list readonly $colors(-frame) disabled $colors(-frame)] \
70	    -arrowcolor [list disabled $colors(-disabledfg)]
71
72	ttk::style configure TLabelframe \
73	    -relief groove -borderwidth 2
74
75	ttk::style configure TScrollbar \
76	    -width 12 -arrowsize 12
77	ttk::style map TScrollbar \
78	    -arrowcolor [list disabled $colors(-disabledfg)]
79
80	ttk::style configure TScale \
81	    -sliderrelief raised
82	ttk::style configure TProgressbar \
83	    -background $colors(-selectbg)
84
85	ttk::style configure TNotebook.Tab \
86	    -padding {4 2} -background $colors(-darker)
87	ttk::style map TNotebook.Tab \
88	    -background [list selected $colors(-frame)]
89
90	# Treeview.
91	#
92	ttk::style configure Heading -font TkHeadingFont -relief raised
93	ttk::style configure Treeview \
94	    -background $colors(-window) \
95	    -foreground $colors(-text) ;
96	ttk::style map Treeview \
97	    -background [list selected $colors(-selectbg)] \
98	    -foreground [list selected $colors(-selectfg)] ;
99
100	# Combobox popdown frame
101	ttk::style layout ComboboxPopdownFrame {
102	    ComboboxPopdownFrame.border -sticky nswe
103	}
104 	ttk::style configure ComboboxPopdownFrame \
105	    -borderwidth 1 -relief solid
106
107	#
108	# Toolbar buttons:
109	#
110	ttk::style layout Toolbutton {
111	    Toolbutton.border -children {
112		Toolbutton.padding -children {
113		    Toolbutton.label
114		}
115	    }
116	}
117
118	ttk::style configure Toolbutton \
119	    -padding 2 -relief flat
120	ttk::style map Toolbutton -relief \
121	    [list disabled flat selected sunken pressed sunken active raised]
122	ttk::style map Toolbutton -background \
123	    [list pressed $colors(-darker)  active $colors(-activebg)]
124    }
125}
126