1 # vim: foldmarker=<<<,>>>
3 package require TLC-base
6 package require Itk
3.1
8 namespace import
-force ::itcl::*
9 namespace import
-force ::itk::*
12 package require BLT
3.0
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]
25 if {[info exists
::tlc_UserThemeOverride]} {
26 set tlc
::theme [tlc
::Daftheme ::#auto]
28 set tlc
::theme [tlc
::Theme ::#auto]
32 package provide TLC
$::tlc::version
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
]
44 foreach {opt settingkey
} {
45 *activeBackground background
46 *highlightBackground highlightbackground
47 *highlightColor highlightcolor
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
62 *enabledBackground textbackground
63 *TreeView.background textbackground
64 *TreeView.borderwidth borderwidth
65 *TreeView.highlightThickness borderwidth
66 *Labelframe.
font boldfont
68 *Button.padY button_pady
69 *frameRelief framerelief
70 *frameBorderwidth frameborderwidth
71 *Spinner.frameRelief entryrelief
72 *Spinner.frameBorderwidth entryborderwidth
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
82 option add
$opt [$tlc::theme setting
$settingkey] 61
85 switch -exact $tcl_platform(platform
) {
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
97 option add
*Radiobutton.borderWidth
0 startupFile
98 option add
*Checkbutton.borderWidth
0 startupFile
99 option add
*Entry.highlightThickness
0 startupFile