figenc

[RADIOACTIVE] rsa and symmetric key encryption scripts and executables
git clone git://git.figbert.com/figenc.git
Log | Files | Refs | README

defaults.tcl (4347B)


      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 selected $colors(-selectbg)] \
    114 	    -foreground [list selected $colors(-selectfg)] ;
    115 
    116 	# Combobox popdown frame
    117 	ttk::style layout ComboboxPopdownFrame {
    118 	    ComboboxPopdownFrame.border -sticky nswe
    119 	}
    120  	ttk::style configure ComboboxPopdownFrame \
    121 	    -borderwidth 1 -relief solid
    122 
    123 	#
    124 	# Toolbar buttons:
    125 	#
    126 	ttk::style layout Toolbutton {
    127 	    Toolbutton.border -children {
    128 		Toolbutton.padding -children {
    129 		    Toolbutton.label
    130 		}
    131 	    }
    132 	}
    133 
    134 	ttk::style configure Toolbutton \
    135 	    -padding 2 -relief flat
    136 	ttk::style map Toolbutton -relief \
    137 	    [list disabled flat selected sunken pressed sunken active raised]
    138 	ttk::style map Toolbutton -background \
    139 	    [list pressed $colors(-darker)  active $colors(-activebg)]
    140     }
    141 }