Added *.sqlite to the list of files ignored by git
[tcl-tlc.git] / tlc.tcl
blobe56f78c8d962f2a65d8d63a41102b42229357843
1 # vim: foldmarker=<<<,>>>
3 package require TLC-base
5 namespace eval :: {
6 package require Itk 3.1
8 namespace import -force ::itcl::*
9 namespace import -force ::itk::*
11 if {[catch {
12 package require BLT 3.0
13 }]} {
14 package require BLT 2.4
18 namespace eval ::tlc {
19 namespace import ::blt::*
22 if {[info exists tlc::custom_theme_object]} {
23 set tlc::theme $tlc::custom_theme_object ::#auto]
24 } else {
25 if {[info exists ::tlc_UserThemeOverride]} {
26 set tlc::theme [tlc::Daftheme ::#auto]
27 } else {
28 set tlc::theme [tlc::Theme ::#auto]
32 package provide TLC $::tlc::version
34 # Set saner defaults
36 bind Text <Key-Tab> {tk_focusNext %W}
37 bind Text <Shift-Key-Tab> {tk_focusPrev %W}
39 tlc::Baseconfig tlc::default_config -configfile ""
40 array set tlc::config [tlc::default_config dump_config]
42 # Default options <<<
44 foreach {opt settingkey} {
45 *activeBackground background
46 *highlightBackground highlightbackground
47 *highlightColor highlightcolor
48 *font font
49 *labelFont font
50 *textFont font
51 *selectBorderWidth selectborderwidth
52 *selectBackground selectbackground
53 *selectForeground selectforeground
54 *Tabset*selectBackground background
55 *textBackground textbackground
56 *Listbox.background textbackground
57 *disabledBackground disabledbackground
58 *Entry.disabledForeground disabledforeground
59 *Text.disabledForeground disabledforeground
60 *Text.TextHighlightBackground texthighlightbackground
61 *.hidebg hidebg
62 *enabledBackground textbackground
63 *TreeView.background textbackground
64 *TreeView.borderwidth borderwidth
65 *TreeView.highlightThickness borderwidth
66 *Labelframe.font boldfont
67 *labelFont boldfont
68 *Button.padY button_pady
69 *frameRelief framerelief
70 *frameBorderwidth frameborderwidth
71 *Spinner.frameRelief entryrelief
72 *Spinner.frameBorderwidth entryborderwidth
73 } {
74 option add $opt [$tlc::theme setting $settingkey] startupFile
77 # Hacks. userdefault priority == 60
78 foreach {opt settingkey} {
79 *Entry.background textbackground
80 *Entry.highlightBackground background
81 } {
82 option add $opt [$tlc::theme setting $settingkey] 61
85 switch -exact $tcl_platform(platform) {
86 "unix" {
87 option add *Scrollbar.width 12 startupFile
88 option add *Scrollbar.borderWidth 1 startupFile
89 option add *sbWidth 12 startupFile
90 option add *scrollMargin 0 startupFile
91 option add *elementBorderWidth 1 startupFile
92 option add *textFont [$tlc::theme setting font] startupFile
93 option add *Menu.font [$tlc::theme setting boldfont] startupFile
94 option add *Menu.borderWidth 1 startupFile
96 "windows" {
97 option add *Radiobutton.borderWidth 0 startupFile
98 option add *Checkbutton.borderWidth 0 startupFile
99 option add *Entry.highlightThickness 0 startupFile
102 #>>>