OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / lib / tk8.6 / ttk / classicTheme.tcl
1 #
2 # "classic" Tk theme.
3 #
4 # Implements Tk's traditional Motif-like look and feel.
5 #
6
7 namespace eval ttk::theme::classic {
8
9     variable colors; array set colors {
10         -frame          "#d9d9d9"
11         -window         "#ffffff"
12         -activebg       "#ececec"
13         -troughbg       "#c3c3c3"
14         -selectbg       "#c3c3c3"
15         -selectfg       "#000000"
16         -disabledfg     "#a3a3a3"
17         -indicator      "#b03060"
18     }
19
20     ttk::style theme settings classic {
21         ttk::style configure "." \
22             -font               TkDefaultFont \
23             -background         $colors(-frame) \
24             -foreground         black \
25             -selectbackground   $colors(-selectbg) \
26             -selectforeground   $colors(-selectfg) \
27             -troughcolor        $colors(-troughbg) \
28             -indicatorcolor     $colors(-frame) \
29             -highlightcolor     $colors(-frame) \
30             -highlightthickness 1 \
31             -selectborderwidth  1 \
32             -insertwidth        2 \
33             ;
34
35         # To match pre-Xft X11 appearance, use:
36         #       ttk::style configure . -font {Helvetica 12 bold}
37
38         ttk::style map "." -background \
39             [list disabled $colors(-frame) active $colors(-activebg)]
40         ttk::style map "." -foreground \
41             [list disabled $colors(-disabledfg)]
42
43         ttk::style map "." -highlightcolor [list focus black]
44
45         ttk::style configure TButton \
46             -anchor center -padding "3m 1m" -relief raised -shiftrelief 1
47         ttk::style map TButton -relief [list {!disabled pressed} sunken]
48
49         ttk::style configure TCheckbutton -indicatorrelief raised
50         ttk::style map TCheckbutton \
51             -indicatorcolor [list \
52                 pressed $colors(-frame)  selected $colors(-indicator)] \
53             -indicatorrelief {selected sunken  pressed sunken} \
54             ;
55
56         ttk::style configure TRadiobutton -indicatorrelief raised
57         ttk::style map TRadiobutton \
58             -indicatorcolor [list \
59                 pressed $colors(-frame)  selected $colors(-indicator)] \
60             -indicatorrelief {selected sunken  pressed sunken} \
61             ;
62
63         ttk::style configure TMenubutton -relief raised -padding "3m 1m"
64
65         ttk::style configure TEntry -relief sunken -padding 1 -font TkTextFont
66         ttk::style map TEntry -fieldbackground \
67                 [list readonly $colors(-frame) disabled $colors(-frame)]
68         ttk::style configure TCombobox -padding 1
69         ttk::style map TCombobox -fieldbackground \
70                 [list readonly $colors(-frame) disabled $colors(-frame)]
71         ttk::style configure ComboboxPopdownFrame \
72             -relief solid -borderwidth 1
73
74         ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
75         ttk::style map TSpinbox -fieldbackground \
76             [list readonly $colors(-frame) disabled $colors(-frame)]
77
78         ttk::style configure TLabelframe -borderwidth 2 -relief groove
79
80         ttk::style configure TScrollbar -relief raised
81         ttk::style map TScrollbar -relief {{pressed !disabled} sunken}
82
83         ttk::style configure TScale -sliderrelief raised
84         ttk::style map TScale -sliderrelief {{pressed !disabled} sunken}
85
86         ttk::style configure TProgressbar -background SteelBlue
87         ttk::style configure TNotebook.Tab \
88             -padding {3m 1m} \
89             -background $colors(-troughbg)
90         ttk::style map TNotebook.Tab -background [list selected $colors(-frame)]
91
92         # Treeview:
93         ttk::style configure Heading -font TkHeadingFont -relief raised
94         ttk::style configure Treeview -background $colors(-window)
95         ttk::style map Treeview \
96             -background [list selected $colors(-selectbg)] \
97             -foreground [list selected $colors(-selectfg)] ;
98
99         #
100         # Toolbar buttons:
101         #
102         ttk::style configure Toolbutton -padding 2 -relief flat -shiftrelief 2
103         ttk::style map Toolbutton -relief \
104             {disabled flat selected sunken pressed sunken active raised}
105         ttk::style map Toolbutton -background \
106             [list pressed $colors(-troughbg)  active $colors(-activebg)]
107     }
108 }