4 # Implements Tk's traditional Motif-like look and feel.
7 namespace eval ttk
::theme::classic {
9 variable colors; array set colors {
20 ttk
::style theme settings classic
{
21 ttk
::style configure
"." \
23 -background $colors(-frame) \
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 \
35 # To match pre-Xft X11 appearance, use:
36 # ttk::style configure . -font {Helvetica 12 bold}
38 ttk
::style map
"." -background \
39 [list disabled
$colors(-frame) active
$colors(-activebg)]
40 ttk
::style map
"." -foreground \
41 [list disabled
$colors(-disabledfg)]
43 ttk
::style map
"." -highlightcolor [list focus black
]
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
]
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
} \
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
} \
63 ttk
::style configure TMenubutton
-relief raised
-padding "3m 1m"
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
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)]
78 ttk
::style configure TLabelframe
-borderwidth 2 -relief groove
80 ttk
::style configure TScrollbar
-relief raised
81 ttk
::style map TScrollbar
-relief {{pressed
!disabled
} sunken
}
83 ttk
::style configure TScale
-sliderrelief raised
84 ttk
::style map TScale
-sliderrelief {{pressed
!disabled
} sunken
}
86 ttk
::style configure TProgressbar
-background SteelBlue
87 ttk
::style configure TNotebook.Tab
\
89 -background $colors(-troughbg)
90 ttk
::style map TNotebook.Tab
-background [list selected
$colors(-frame)]
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)] ;
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)]