1#
2# $Id$
3#
4# Ttk widget set: Alternate theme
5#
6
7namespace eval ttk::theme::alt {
8
9    variable colors
10    array set colors {
11	-frame 		"#d9d9d9"
12	-window		"#ffffff"
13	-darker 	"#c3c3c3"
14	-border		"#414141"
15	-activebg 	"#ececec"
16	-disabledfg	"#a3a3a3"
17	-selectbg	"#4a6984"
18	-selectfg	"#ffffff"
19    }
20
21    ttk::style theme settings alt {
22
23	ttk::style configure "." \
24	    -background 	$colors(-frame) \
25	    -foreground 	black \
26	    -troughcolor	$colors(-darker) \
27	    -bordercolor	$colors(-border) \
28	    -selectbackground 	$colors(-selectbg) \
29	    -selectforeground 	$colors(-selectfg) \
30	    -font 		TkDefaultFont \
31	    ;
32
33	ttk::style map "." -background \
34	    [list disabled $colors(-frame)  active $colors(-activebg)] ;
35	ttk::style map "." -foreground [list disabled $colors(-disabledfg)] ;
36        ttk::style map "." -embossed [list disabled 1] ;
37
38	ttk::style configure TButton \
39	    -anchor center -width -11 -padding "1 1" \
40	    -relief raised -shiftrelief 1 \
41	    -highlightthickness 1 -highlightcolor $colors(-frame)
42
43	ttk::style map TButton -relief {
44	    {pressed !disabled} 	sunken
45	    {active !disabled} 	raised
46	} -highlightcolor {alternate black}
47
48	ttk::style configure TCheckbutton -indicatorcolor "#ffffff" -padding 2
49	ttk::style configure TRadiobutton -indicatorcolor "#ffffff" -padding 2
50	ttk::style map TCheckbutton -indicatorcolor \
51	    [list  disabled $colors(-frame)  pressed $colors(-frame)]
52	ttk::style map TRadiobutton -indicatorcolor \
53	    [list  disabled $colors(-frame)  pressed $colors(-frame)]
54
55	ttk::style configure TMenubutton \
56	    -width -11 -padding "3 3" -relief raised
57
58	ttk::style configure TEntry -padding 1
59	ttk::style map TEntry -fieldbackground \
60		[list readonly $colors(-frame) disabled $colors(-frame)]
61	ttk::style configure TCombobox -padding 1
62	ttk::style map TCombobox -fieldbackground \
63		[list readonly $colors(-frame) disabled $colors(-frame)]
64	ttk::style configure ComboboxPopdownFrame \
65	    -relief solid -borderwidth 1
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 Toolbutton -relief flat -padding 2
73	ttk::style map Toolbutton -relief \
74	    {disabled flat selected sunken pressed sunken active raised}
75	ttk::style map Toolbutton -background \
76	    [list pressed $colors(-darker)  active $colors(-activebg)]
77
78	ttk::style configure TScrollbar -relief raised
79
80	ttk::style configure TLabelframe -relief groove -borderwidth 2
81
82	ttk::style configure TNotebook -tabmargins {2 2 1 0}
83	ttk::style configure TNotebook.Tab \
84	    -padding {4 2} -background $colors(-darker)
85	ttk::style map TNotebook.Tab \
86	    -background [list selected $colors(-frame)] \
87	    -expand [list selected {2 2 1 0}] \
88	    ;
89
90	# Treeview:
91	ttk::style configure Heading -font TkHeadingFont -relief raised
92	ttk::style configure Treeview -background $colors(-window)
93	ttk::style map Treeview \
94	    -background [list selected $colors(-selectbg)] \
95	    -foreground [list selected $colors(-selectfg)] ;
96
97	ttk::style configure TScale \
98	    -groovewidth 4 -troughrelief sunken \
99	    -sliderwidth raised -borderwidth 2
100	ttk::style configure TProgressbar \
101	    -background $colors(-selectbg) -borderwidth 0
102    }
103}
104