OSDN Git Service

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