/ lib / tcltk / tk8.6 / ttk / xpTheme.tcl
xpTheme.tcl
 1  #
 2  # Settings for 'xpnative' theme
 3  #
 4  
 5  namespace eval ttk::theme::xpnative {
 6  
 7      ttk::style theme settings xpnative {
 8  
 9  	ttk::style configure . \
10  	    -background SystemButtonFace \
11  	    -foreground SystemWindowText \
12  	    -selectforeground SystemHighlightText \
13  	    -selectbackground SystemHighlight \
14  	    -insertcolor SystemWindowText \
15  	    -font TkDefaultFont \
16  	    ;
17  
18  	ttk::style map "." \
19  	    -foreground [list disabled SystemGrayText] \
20  	    ;
21  
22  	ttk::style configure TButton -anchor center -padding {1 1} -width -11
23  	ttk::style configure TRadiobutton -padding 2
24  	ttk::style configure TCheckbutton -padding 2
25  	ttk::style configure TMenubutton -padding {8 4}
26  
27  	ttk::style configure TNotebook -tabmargins {2 2 2 0}
28  	ttk::style map TNotebook.Tab \
29  	    -expand [list selected {2 2 2 2}]
30  
31  	ttk::style configure TLabelframe.Label -foreground "#0046d5"
32  
33  	# OR: -padding {3 3 3 6}, which some apps seem to use.
34  	ttk::style configure TEntry -padding {2 2 2 4}
35  	ttk::style map TEntry \
36  	    -selectbackground [list !focus SystemWindow] \
37  	    -selectforeground [list !focus SystemWindowText] \
38  	    ;
39  	ttk::style configure TCombobox -padding 2
40  	ttk::style map TCombobox \
41  	    -selectbackground [list !focus SystemWindow] \
42  	    -selectforeground [list !focus SystemWindowText] \
43  	    -foreground	[list \
44  		disabled		SystemGrayText \
45  	    	{readonly focus}	SystemHighlightText \
46  	    ] \
47  	    -focusfill	[list {readonly focus} SystemHighlight] \
48  	    ;
49  
50  	ttk::style configure TSpinbox -padding {2 0 14 0}
51  	ttk::style map TSpinbox \
52  	    -selectbackground [list !focus SystemWindow] \
53  	    -selectforeground [list !focus SystemWindowText] \
54  	    ;
55  
56  	ttk::style configure Toolbutton -padding {4 4}
57  
58  	# Treeview:
59  	ttk::style configure Heading -font TkHeadingFont -relief raised
60  	ttk::style configure Treeview -background SystemWindow
61  	ttk::style map Treeview \
62  	    -background [list   disabled SystemButtonFace \
63  				selected SystemHighlight] \
64  	    -foreground [list   disabled SystemGrayText \
65  				selected SystemHighlightText];
66      }
67  }