1 # vim: foldmarker=<<<,>>>
3 package require TLC-base
6 package require Itk
3.1
8 namespace import
-force ::itcl::*
9 namespace import
-force ::itk::*
11 if {![package vsatisfies
$::tcl_version 8.5] ||
13 package require blttable
14 namespace eval ::blt {
16 return [uplevel [list ::blttable::table] $args]
21 package require BLT
3.0
23 package require BLT
2.4
28 namespace eval ::tlc {
29 namespace eval ::blt {}
30 namespace eval ::blttable {namespace export
*}
32 namespace import
::blt::*
33 if {[info commands
::blttable::table] != ""} {
34 namespace import
::blttable::*
38 if {[info exists tlc
::custom_theme_object]} {
39 set tlc
::theme $tlc::custom_theme_object ::#auto]
41 if {[info exists
::tlc_UserThemeOverride]} {
42 set tlc
::theme [tlc
::Daftheme ::#auto]
44 set tlc
::theme [tlc
::Theme ::#auto]
48 package provide TLC
$::tlc::version
52 bind Text
<Key-Tab
> {tk_focusNext %W
}
53 bind Text
<Shift-Key-Tab
> {tk_focusPrev %W
}
55 tlc
::Baseconfig tlc
::default_config -configfile ""
56 array set tlc
::config [tlc
::default_config dump_config
]
60 foreach {opt settingkey
} {
61 *activeBackground background
62 *highlightBackground highlightbackground
63 *highlightColor highlightcolor
67 *selectBorderWidth selectborderwidth
68 *selectBackground selectbackground
69 *selectForeground selectforeground
70 *Tabset
*selectBackground background
71 *textBackground textbackground
72 *Listbox.background textbackground
73 *disabledBackground disabledbackground
74 *Entry.disabledForeground disabledforeground
75 *Text.disabledForeground disabledforeground
76 *Text.TextHighlightBackground texthighlightbackground
78 *enabledBackground textbackground
79 *TreeView.background textbackground
80 *TreeView.borderwidth borderwidth
81 *TreeView.highlightThickness borderwidth
82 *Labelframe.
font boldfont
84 *Button.padY button_pady
85 *frameRelief framerelief
86 *frameBorderwidth frameborderwidth
87 *Spinner.frameRelief entryrelief
88 *Spinner.frameBorderwidth entryborderwidth
89 *Form.padding formpadding
91 option add
$opt [$tlc::theme setting
$settingkey] startupFile
94 # Hacks. userdefault priority == 60
95 foreach {opt settingkey
} {
96 *Entry.background textbackground
97 *Entry.highlightBackground background
98 *TreeCtrl.background textbackground
100 option add
$opt [$tlc::theme setting
$settingkey] 61
103 switch -exact $tcl_platform(platform
) {
105 option add
*Scrollbar.width
12 startupFile
106 option add
*Scrollbar.borderWidth
1 startupFile
107 option add
*sbWidth
12 startupFile
108 option add
*scrollMargin
0 startupFile
109 option add
*elementBorderWidth
1 startupFile
110 option add
*textFont
[$tlc::theme setting
font] startupFile
111 option add
*Menu.
font [$tlc::theme setting boldfont
] startupFile
112 option add
*Menu.borderWidth
1 startupFile
115 option add
*Radiobutton.borderWidth
0 startupFile
116 option add
*Checkbutton.borderWidth
0 startupFile
117 option add
*Entry.highlightThickness
0 startupFile