1
0
mirror of https://bitbucket.org/svk28/rac-gui synced 2024-12-04 18:46:52 +00:00

Добавлены в конфиг настройки темы. Реализована работа с темами.

This commit is contained in:
Sergey Kalinin 2019-08-30 16:03:07 +03:00
parent 6fc029c32e
commit b2159137db
5 changed files with 23 additions and 10 deletions

View File

@ -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
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

View File

@ -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"
}

View File

@ -139,3 +139,4 @@ namespace eval ::tablelist:: {

View File

@ -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

View File

@ -110,4 +110,3 @@ if [file exists [file join $dir(work) 1c_srv_new.cfg]] {
puts $servers_list
}