figenc

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

altTheme.tcl (3683B)


      1 #
      2 # Ttk widget set: Alternate theme
      3 #
      4 
      5 namespace eval ttk::theme::alt {
      6 
      7     variable colors
      8     array set colors {
      9 	-frame 		"#d9d9d9"
     10 	-window		"#ffffff"
     11 	-darker 	"#c3c3c3"
     12 	-border		"#414141"
     13 	-activebg 	"#ececec"
     14 	-disabledfg	"#a3a3a3"
     15 	-selectbg	"#4a6984"
     16 	-selectfg	"#ffffff"
     17 	-altindicator	"#aaaaaa"
     18     }
     19 
     20     ttk::style theme settings alt {
     21 
     22 	ttk::style configure "." \
     23 	    -background 	$colors(-frame) \
     24 	    -foreground 	black \
     25 	    -troughcolor	$colors(-darker) \
     26 	    -bordercolor	$colors(-border) \
     27 	    -selectbackground 	$colors(-selectbg) \
     28 	    -selectforeground 	$colors(-selectfg) \
     29 	    -font 		TkDefaultFont \
     30 	    ;
     31 
     32 	ttk::style map "." -background \
     33 	    [list disabled $colors(-frame)  active $colors(-activebg)] ;
     34 	ttk::style map "." -foreground [list disabled $colors(-disabledfg)] ;
     35         ttk::style map "." -embossed [list disabled 1] ;
     36 
     37 	ttk::style configure TButton \
     38 	    -anchor center -width -11 -padding "1 1" \
     39 	    -relief raised -shiftrelief 1 \
     40 	    -highlightthickness 1 -highlightcolor $colors(-frame)
     41 
     42 	ttk::style map TButton -relief {
     43 	    {pressed !disabled} 	sunken
     44 	    {active !disabled} 	raised
     45 	} -highlightcolor {alternate black}
     46 
     47 	ttk::style configure TCheckbutton -indicatorcolor "#ffffff" -padding 2
     48 	ttk::style configure TRadiobutton -indicatorcolor "#ffffff" -padding 2
     49 	ttk::style map TCheckbutton -indicatorcolor \
     50 	    [list  pressed $colors(-frame) \
     51 	           alternate $colors(-altindicator) \
     52 	           disabled $colors(-frame)]
     53 	ttk::style map TRadiobutton -indicatorcolor \
     54 	    [list  pressed $colors(-frame) \
     55 	           alternate $colors(-altindicator) \
     56 	           disabled $colors(-frame)]
     57 
     58 	ttk::style configure TMenubutton \
     59 	    -width -11 -padding "3 3" -relief raised
     60 
     61 	ttk::style configure TEntry -padding 1
     62 	ttk::style map TEntry -fieldbackground \
     63 		[list readonly $colors(-frame) disabled $colors(-frame)]
     64 	ttk::style configure TCombobox -padding 1
     65 	ttk::style map TCombobox -fieldbackground \
     66 		[list readonly $colors(-frame) disabled $colors(-frame)] \
     67 		-arrowcolor [list disabled $colors(-disabledfg)]
     68 	ttk::style configure ComboboxPopdownFrame \
     69 	    -relief solid -borderwidth 1
     70 
     71 	ttk::style configure TSpinbox -arrowsize 10 -padding {2 0 10 0}
     72 	ttk::style map TSpinbox -fieldbackground \
     73 	    [list readonly $colors(-frame) disabled $colors(-frame)] \
     74 	    -arrowcolor [list disabled $colors(-disabledfg)]
     75 
     76 	ttk::style configure Toolbutton -relief flat -padding 2
     77 	ttk::style map Toolbutton -relief \
     78 	    {disabled flat selected sunken pressed sunken active raised}
     79 	ttk::style map Toolbutton -background \
     80 	    [list pressed $colors(-darker)  active $colors(-activebg)]
     81 
     82 	ttk::style configure TScrollbar -relief raised
     83 
     84 	ttk::style configure TLabelframe -relief groove -borderwidth 2
     85 
     86 	ttk::style configure TNotebook -tabmargins {2 2 1 0}
     87 	ttk::style configure TNotebook.Tab \
     88 	    -padding {4 2} -background $colors(-darker)
     89 	ttk::style map TNotebook.Tab \
     90 	    -background [list selected $colors(-frame)] \
     91 	    -expand [list selected {2 2 1 0}] \
     92 	    ;
     93 
     94 	# Treeview:
     95 	ttk::style configure Heading -font TkHeadingFont -relief raised
     96 	ttk::style configure Treeview -background $colors(-window)
     97 	ttk::style map Treeview \
     98 	    -background [list disabled $colors(-frame)\
     99 				{!disabled !selected} $colors(-window) \
    100 				selected $colors(-selectbg)] \
    101 	    -foreground [list disabled $colors(-disabledfg) \
    102 				{!disabled !selected} black \
    103 				selected $colors(-selectfg)]
    104 
    105 	ttk::style configure TScale \
    106 	    -groovewidth 4 -troughrelief sunken \
    107 	    -sliderwidth raised -borderwidth 2
    108 	ttk::style configure TProgressbar \
    109 	    -background $colors(-selectbg) -borderwidth 0
    110     }
    111 }