2 # $Id: classicTheme.tcl,v 1.3 2006/12/18 19:33:14 jenglish Exp $
6 # Implements Tk's traditional Motif-like look and feel.
9 namespace eval ttk
::theme::classic {
11 variable colors; array set colors {
22 namespace import
-force ::ttk::style
23 style theme settings classic
{
26 -background $colors(-frame) \
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 \
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
\
85 -background $colors(-troughbg)
86 style map TNotebook.Tab
-background [list selected
$colors(-frame)]
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)
93 -background [list selected
$colors(-selectbg)] \
94 -foreground [list selected
$colors(-selectfg)] ;
96 -background [list selected
$colors(-selectbg)] \
97 -foreground [list selected
$colors(-selectfg)] ;
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)]