Добавлена подсветка текущего элемента дерева и списка

Поправлено редактирование профиля безопасности
This commit is contained in:
Sergey Kalinin 2018-08-03 09:19:59 +03:00
parent 3e6ee19d7f
commit 97be45ee67
3 changed files with 18 additions and 3 deletions

View File

@ -18,10 +18,14 @@ set server ""
proc TreePress {tree} {
global host server active_cluster infobase
set id [$tree selection]
$tree tag remove selected
$tree item $id -tags selected
SetGlobalVarFromTreeItems $tree $id
set values [$tree item $id -values]
set key [lindex [split $id "::"] 0]
if {$values eq "" || $key eq ""} {return}
Run::$key $tree $host $values
}
@ -2000,7 +2004,8 @@ proc Edit::profile {tree host values} {
}
}
proc Edit::profiles {tree host values} {
return
#return
Edit::profile $tree $host $values
}
proc Edit::directory {tree host values} {

View File

@ -80,6 +80,14 @@ $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
$tree_work tag configure selected -background white -foreground black
bind $tree_work <ButtonRelease-1> {
$tree_work tag remove selected
$tree_work item [.frm_work.tree_work selection] -tags selected
}
#$tree_work heading par -text "Параметр" -anchor center
#$tree_work heading val -text "Значение" -anchor center
#set tree_work [ttk::treeview $frm_work.tree_work \
@ -99,3 +107,4 @@ pack $frm_tree $frm_work -side left -expand true -fill both
.panel add $frm_tree -weight 1
.panel add $frm_work -weight 1

View File

@ -90,8 +90,7 @@ namespace eval ttk::theme::dark {
ttk::style configure Treeview \
-background $colors(-lightframe) -itembackground {gray60 gray50} \
-itemfill #ffffff -itemaccentfill yellow \
-fieldbackground $colors(-lightframe) \
-selectbg "#4a6984"
-fieldbackground $colors(-lightframe)
# ttk::style configure TreeCtrl \
# -background gray30 -itembackground {gray60 gray50} \
# -itemfill #ffffff -itemaccentfill yellow
@ -138,3 +137,5 @@ namespace eval ::tablelist:: {
}
}