xpTheme.tcl (2375B)
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 # Treeview: 32 ttk::style configure Heading -font TkHeadingFont 33 ttk::style configure Treeview -background SystemWindow 34 ttk::style map Treeview \ 35 -background [list selected SystemHighlight] \ 36 -foreground [list selected SystemHighlightText] ; 37 38 ttk::style configure TLabelframe.Label -foreground "#0046d5" 39 40 # OR: -padding {3 3 3 6}, which some apps seem to use. 41 ttk::style configure TEntry -padding {2 2 2 4} 42 ttk::style map TEntry \ 43 -selectbackground [list !focus SystemWindow] \ 44 -selectforeground [list !focus SystemWindowText] \ 45 ; 46 ttk::style configure TCombobox -padding 2 47 ttk::style map TCombobox \ 48 -selectbackground [list !focus SystemWindow] \ 49 -selectforeground [list !focus SystemWindowText] \ 50 -foreground [list \ 51 disabled SystemGrayText \ 52 {readonly focus} SystemHighlightText \ 53 ] \ 54 -focusfill [list {readonly focus} SystemHighlight] \ 55 ; 56 57 ttk::style configure TSpinbox -padding {2 0 14 0} 58 ttk::style map TSpinbox \ 59 -selectbackground [list !focus SystemWindow] \ 60 -selectforeground [list !focus SystemWindowText] \ 61 ; 62 63 ttk::style configure Toolbutton -padding {4 4} 64 65 # Treeview: 66 ttk::style configure Heading -font TkHeadingFont -relief raised 67 ttk::style configure Treeview -background SystemWindow 68 ttk::style map Treeview \ 69 -background [list disabled SystemButtonFace \ 70 {!disabled !selected} SystemWindow \ 71 selected SystemHighlight] \ 72 -foreground [list disabled SystemGrayText \ 73 {!disabled !selected} SystemWindowText \ 74 selected SystemHighlightText]; 75 } 76 }