Добавлены в конфиг настройки темы. Реализована работа с темами.
This commit is contained in:
parent
6fc029c32e
commit
b2159137db
13
lib/gui.tcl
13
lib/gui.tcl
|
@ -31,7 +31,10 @@ bind . <Control-Q> Quit
|
|||
#ttk::style configure Custom.Treeview -foreground red
|
||||
#ttk::style configure Custom.Treeview -rowheight 20
|
||||
|
||||
ttk::style theme use dark
|
||||
|
||||
if [info exists default(theme)] {
|
||||
ttk::style theme use $default(theme)
|
||||
}
|
||||
|
||||
# Панель инсрументов
|
||||
set frm_tool [ttk::frame .frm_tool]
|
||||
|
@ -79,8 +82,11 @@ set tree_work [
|
|||
-yscrollcommand [list $frm_work.vsb set]
|
||||
]
|
||||
# table rows background colors
|
||||
$tree_work tag configure dark -background $color(dark_table_bg)
|
||||
$tree_work tag configure light -background $color(light_table_bg)
|
||||
|
||||
if {[info exists default(theme)] == 1} {
|
||||
$tree_work tag configure dark -background $color(dark_table_bg)
|
||||
$tree_work tag configure light -background $color(light_table_bg)
|
||||
}
|
||||
bind $tree_work <Double-ButtonPress-1> Edit
|
||||
|
||||
$tree tag configure selected -background white -foreground black
|
||||
|
@ -113,3 +119,4 @@ pack $frm_tree $frm_work -side left -expand true -fill both
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,3 +30,11 @@
|
|||
# option add *ScrollableFrame.Background $editor(bg) interactive
|
||||
# option add *ScrolledWindow.Background $editor(bg) interactive
|
||||
|
||||
|
||||
if {[info exists default(theme)] == 1 && $default(theme) eq "dark"} {
|
||||
set color(dark_table_bg) "#6f6f6f"
|
||||
set color(light_table_bg) "#424242"
|
||||
} else {
|
||||
set color(dark_table_bg) "#e2e2e2"
|
||||
set color(light_table_bg) "#ffffff"
|
||||
}
|
||||
|
|
|
@ -139,3 +139,4 @@ namespace eval ::tablelist:: {
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
10
rac_gui.cfg
10
rac_gui.cfg
|
@ -114,15 +114,13 @@ set default(auth) {
|
|||
os
|
||||
}
|
||||
|
||||
|
||||
## Раскоментировать строки и прописать свои значения если
|
||||
## для Информационных Баз используются эти параметры
|
||||
#set default(infobase_user) "ib_user"
|
||||
#set default(infobase_pwd) "ib_password"
|
||||
|
||||
# цвета строк в таблице
|
||||
#set color(dark_table_bg) "#e2e2e2"
|
||||
#set color(light_table_bg) "#ffffff"
|
||||
set color(dark_table_bg) "#6f6f6f"
|
||||
set color(light_table_bg) "#424242"
|
||||
# Используемая тема
|
||||
# доступны: dark, clam, classic, default, alt
|
||||
set default(theme) dark
|
||||
|
||||
|
||||
|
|
|
@ -110,4 +110,3 @@ if [file exists [file join $dir(work) 1c_srv_new.cfg]] {
|
|||
puts $servers_list
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user