/ lib / tcltk / tk8.6 / ttk / winTheme.tcl
winTheme.tcl
 1  #
 2  # Settings for 'winnative' theme.
 3  #
 4  
 5  namespace eval ttk::theme::winnative {
 6      ttk::style theme settings winnative {
 7  
 8  	ttk::style configure "." \
 9  	    -background SystemButtonFace \
10  	    -foreground SystemWindowText \
11  	    -selectforeground SystemHighlightText \
12  	    -selectbackground SystemHighlight \
13  	    -fieldbackground SystemWindow \
14  	    -insertcolor SystemWindowText \
15  	    -troughcolor SystemScrollbar \
16  	    -font TkDefaultFont \
17  	    ;
18  
19  	ttk::style map "." -foreground [list disabled SystemGrayText] ;
20          ttk::style map "." -embossed [list disabled 1] ;
21  
22  	ttk::style configure TButton \
23  	    -anchor center -width -11 -relief raised -shiftrelief 1
24  	ttk::style configure TCheckbutton -padding "2 4"
25  	ttk::style configure TRadiobutton -padding "2 4"
26  	ttk::style configure TMenubutton \
27  	    -padding "8 4" -arrowsize 3 -relief raised
28  
29  	ttk::style map TButton -relief {{!disabled pressed} sunken}
30  
31  	ttk::style configure TEntry \
32  	    -padding 2 -selectborderwidth 0 -insertwidth 1
33  	ttk::style map TEntry \
34  	    -fieldbackground \
35  	    	[list readonly SystemButtonFace disabled SystemButtonFace] \
36  	    -selectbackground [list !focus SystemWindow] \
37  	    -selectforeground [list !focus SystemWindowText] \
38  	    ;
39  
40  	ttk::style configure TCombobox -padding 2
41  	ttk::style map TCombobox \
42  	    -selectbackground [list !focus SystemWindow] \
43  	    -selectforeground [list !focus SystemWindowText] \
44  	    -fieldbackground [list \
45  	    	readonly SystemButtonFace \
46  		disabled SystemButtonFace] \
47  	    -foreground	[list \
48  		disabled		SystemGrayText \
49  	    	{readonly focus}	SystemHighlightText \
50  	    ] \
51  	    -focusfill	[list {readonly focus} SystemHighlight] \
52  	    ;
53  
54  	ttk::style element create ComboboxPopdownFrame.border from default
55  	ttk::style configure ComboboxPopdownFrame \
56  	    -borderwidth 1 -relief solid
57  
58          ttk::style configure TSpinbox -padding {2 0 16 0}
59  
60  	ttk::style configure TLabelframe -borderwidth 2 -relief groove
61  
62  	ttk::style configure Toolbutton -relief flat -padding {8 4}
63  	ttk::style map Toolbutton -relief \
64  	    {disabled flat selected sunken  pressed sunken  active raised}
65  
66  	ttk::style configure TScale -groovewidth 4
67  
68  	ttk::style configure TNotebook -tabmargins {2 2 2 0}
69  	ttk::style configure TNotebook.Tab -padding {3 1} -borderwidth 1
70  	ttk::style map TNotebook.Tab -expand [list selected {2 2 2 0}]
71  
72  	# Treeview:
73  	ttk::style configure Heading -font TkHeadingFont -relief raised
74  	ttk::style configure Treeview -background SystemWindow
75  	ttk::style map Treeview \
76  	    -background [list   disabled SystemButtonFace \
77  				selected SystemHighlight] \
78  	    -foreground [list   disabled SystemGrayText \
79  				selected SystemHighlightText]
80  
81          ttk::style configure TProgressbar \
82  	    -background SystemHighlight -borderwidth 0 ;
83      }
84  }