Upgrade to Tcl/Tk 8.5b2
[msysgit.git] / mingw / lib / tk8.5 / ttk / classicTheme.tcl
blob2061b4e0c32407304d991f8cd21fe8a7ca965ee7
2 # $Id: classicTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $
4 # "classic" Tk theme.
6 # Implements Tk's traditional Motif-like look and feel.
9 namespace eval ttk::theme::classic {
11 variable colors; array set colors {
12 -frame "#d9d9d9"
13 -window "#ffffff"
14 -activebg "#ececec"
15 -troughbg "#c3c3c3"
16 -selectbg "#c3c3c3"
17 -selectfg "#000000"
18 -disabledfg "#a3a3a3"
19 -indicator "#b03060"
22 namespace import -force ::ttk::style
23 style theme settings classic {
24 style configure "." \
25 -font TkDefaultFont \
26 -background $colors(-frame) \
27 -foreground black \
28 -selectbackground $colors(-selectbg) \
29 -selectforeground $colors(-selectfg) \
30 -troughcolor $colors(-troughbg) \
31 -indicatorcolor $colors(-frame) \
32 -highlightcolor $colors(-frame) \
33 -highlightthickness 1 \
34 -selectborderwidth 1 \
35 -insertwidth 2 \
38 # To match pre-Xft X11 appearance, use:
39 # ttk::style configure . -font {Helvetica 12 bold}
41 style map "." -background \
42 [list disabled $colors(-frame) active $colors(-activebg)]
43 style map "." -foreground \
44 [list disabled $colors(-disabledfg)]
46 style map "." -highlightcolor [list focus black]
48 style configure TButton -padding "3m 1m" -relief raised -shiftrelief 1
49 style map TButton -relief [list {!disabled pressed} sunken]
51 style configure TCheckbutton -indicatorrelief raised
52 style map TCheckbutton \
53 -indicatorcolor [list \
54 pressed $colors(-frame) selected $colors(-indicator)] \
55 -indicatorrelief {selected sunken pressed sunken} \
58 style configure TRadiobutton -indicatorrelief raised
59 style map TRadiobutton \
60 -indicatorcolor [list \
61 pressed $colors(-frame) selected $colors(-indicator)] \
62 -indicatorrelief {selected sunken pressed sunken} \
65 style configure TMenubutton -relief raised -padding "3m 1m"
67 style configure TEntry -relief sunken -padding 1 -font TkTextFont
68 style map TEntry -fieldbackground \
69 [list readonly $colors(-frame) disabled $colors(-frame)]
70 style configure TCombobox -padding 1
71 style map TCombobox -fieldbackground \
72 [list readonly $colors(-frame) disabled $colors(-frame)]
74 style configure TLabelframe -borderwidth 2 -relief groove
76 style configure TScrollbar -relief raised
77 style map TScrollbar -relief {{pressed !disabled} sunken}
79 style configure TScale -sliderrelief raised
80 style map TScale -sliderrelief {{pressed !disabled} sunken}
82 style configure TProgressbar -background SteelBlue
83 style configure TNotebook.Tab \
84 -padding {3m 1m} \
85 -background $colors(-troughbg)
86 style map TNotebook.Tab -background [list selected $colors(-frame)]
88 # Treeview:
89 ttk::style configure Heading -font TkHeadingFont -relief raised
90 ttk::style configure Row -background $colors(-window)
91 ttk::style configure Cell -background $colors(-window)
92 ttk::style map Row \
93 -background [list selected $colors(-selectbg)] \
94 -foreground [list selected $colors(-selectfg)] ;
95 ttk::style map Cell \
96 -background [list selected $colors(-selectbg)] \
97 -foreground [list selected $colors(-selectfg)] ;
100 # Toolbar buttons:
102 style configure Toolbutton -padding 2 -relief flat -shiftrelief 2
103 style map Toolbutton -relief \
104 {disabled flat selected sunken pressed sunken active raised}
105 style map Toolbutton -background \
106 [list pressed $colors(-troughbg) active $colors(-activebg)]