"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tltcl/lib/tk8.6/ttk/defaults.tcl" (17 Mar 2020, 4411 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Tcl/Tk source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # Settings for default theme.
    3 #
    4 
    5 namespace eval ttk::theme::default {
    6     variable colors
    7     array set colors {
    8     -frame          "#d9d9d9"
    9     -foreground     "#000000"
   10     -window         "#ffffff"
   11     -text           "#000000"
   12     -activebg       "#ececec"
   13     -selectbg       "#4a6984"
   14     -selectfg       "#ffffff"
   15     -darker         "#c3c3c3"
   16     -disabledfg     "#a3a3a3"
   17     -indicator      "#4a6984"
   18     -disabledindicator  "#a3a3a3"
   19     -altindicator       "#9fbdd8"
   20     -disabledaltindicator   "#c0c0c0"
   21     }
   22 
   23     ttk::style theme settings default {
   24 
   25     ttk::style configure "." \
   26         -borderwidth    1 \
   27         -background     $colors(-frame) \
   28         -foreground     $colors(-foreground) \
   29         -troughcolor    $colors(-darker) \
   30         -font       TkDefaultFont \
   31         -selectborderwidth  1 \
   32         -selectbackground   $colors(-selectbg) \
   33         -selectforeground   $colors(-selectfg) \
   34         -insertwidth    1 \
   35         -indicatordiameter  10 \
   36         ;
   37 
   38     ttk::style map "." -background \
   39         [list disabled $colors(-frame)  active $colors(-activebg)]
   40     ttk::style map "." -foreground \
   41         [list disabled $colors(-disabledfg)]
   42 
   43     ttk::style configure TButton \
   44         -anchor center -padding "3 3" -width -9 \
   45         -relief raised -shiftrelief 1
   46     ttk::style map TButton -relief [list {!disabled pressed} sunken] 
   47 
   48     ttk::style configure TCheckbutton \
   49         -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
   50     ttk::style map TCheckbutton -indicatorcolor \
   51         [list pressed $colors(-activebg)  \
   52             {!disabled alternate} $colors(-altindicator) \
   53             {disabled alternate} $colors(-disabledaltindicator) \
   54             {!disabled selected} $colors(-indicator) \
   55             {disabled selected} $colors(-disabledindicator)]
   56     ttk::style map TCheckbutton -indicatorrelief \
   57         [list alternate raised]
   58 
   59     ttk::style configure TRadiobutton \
   60         -indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
   61     ttk::style map TRadiobutton -indicatorcolor \
   62         [list pressed $colors(-activebg)  \
   63             {!disabled alternate} $colors(-altindicator) \
   64             {disabled alternate} $colors(-disabledaltindicator) \
   65             {!disabled selected} $colors(-indicator) \
   66             {disabled selected} $colors(-disabledindicator)]
   67     ttk::style map TRadiobutton -indicatorrelief \
   68         [list alternate raised]
   69 
   70     ttk::style configure TMenubutton \
   71         -relief raised -padding "10 3"
   72 
   73     ttk::style configure TEntry \
   74         -relief sunken -fieldbackground white -padding 1
   75     ttk::style map TEntry -fieldbackground \
   76         [list readonly $colors(-frame) disabled $colors(-frame)]
   77 
   78     ttk::style configure TCombobox -arrowsize 12 -padding 1
   79     ttk::style map TCombobox -fieldbackground \
   80         [list readonly $colors(-frame) disabled $colors(-frame)] \
   81         -arrowcolor [list disabled $colors(-disabledfg)]
   82 
   83     ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
   84     ttk::style map TSpinbox -fieldbackground \
   85         [list readonly $colors(-frame) disabled $colors(-frame)] \
   86         -arrowcolor [list disabled $colors(-disabledfg)]
   87 
   88     ttk::style configure TLabelframe \
   89         -relief groove -borderwidth 2
   90 
   91     ttk::style configure TScrollbar \
   92         -width 12 -arrowsize 12
   93     ttk::style map TScrollbar \
   94         -arrowcolor [list disabled $colors(-disabledfg)]
   95 
   96     ttk::style configure TScale \
   97         -sliderrelief raised
   98     ttk::style configure TProgressbar \
   99         -background $colors(-selectbg)
  100 
  101     ttk::style configure TNotebook.Tab \
  102         -padding {4 2} -background $colors(-darker)
  103     ttk::style map TNotebook.Tab \
  104         -background [list selected $colors(-frame)]
  105 
  106     # Treeview.
  107     #
  108     ttk::style configure Heading -font TkHeadingFont -relief raised
  109     ttk::style configure Treeview \
  110         -background $colors(-window) \
  111         -foreground $colors(-text) ;
  112     ttk::style map Treeview \
  113         -background [list disabled $colors(-frame)\
  114                 selected $colors(-selectbg)] \
  115         -foreground [list disabled $colors(-disabledfg) \
  116                 selected $colors(-selectfg)]
  117 
  118     # Combobox popdown frame
  119     ttk::style layout ComboboxPopdownFrame {
  120         ComboboxPopdownFrame.border -sticky nswe
  121     }
  122     ttk::style configure ComboboxPopdownFrame \
  123         -borderwidth 1 -relief solid
  124 
  125     #
  126     # Toolbar buttons:
  127     #
  128     ttk::style layout Toolbutton {
  129         Toolbutton.border -children {
  130         Toolbutton.padding -children {
  131             Toolbutton.label
  132         }
  133         }
  134     }
  135 
  136     ttk::style configure Toolbutton \
  137         -padding 2 -relief flat
  138     ttk::style map Toolbutton -relief \
  139         [list disabled flat selected sunken pressed sunken active raised]
  140     ttk::style map Toolbutton -background \
  141         [list pressed $colors(-darker)  active $colors(-activebg)]
  142     }
  143 }