From 97be45ee674e078f953d83b3c6c59c558b983dc4 Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Fri, 3 Aug 2018 09:19:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D1=81=D0=B2=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D1=82=D0=B5=D0=BA=D1=83=D1=89=D0=B5=D0=B3=D0=BE=20?= =?UTF-8?q?=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=20=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B2=D0=B0=20=D0=B8=20=D1=81=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D1=84?= =?UTF-8?q?=D0=B8=D0=BB=D1=8F=20=D0=B1=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0=D1=81?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/function.tcl | 7 ++++++- lib/gui.tcl | 9 +++++++++ lib/ttk_theme_dark.tcl | 5 +++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/function.tcl b/lib/function.tcl index c5dd76e..9d8c2b3 100644 --- a/lib/function.tcl +++ b/lib/function.tcl @@ -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} { diff --git a/lib/gui.tcl b/lib/gui.tcl index 5292543..059c776 100644 --- a/lib/gui.tcl +++ b/lib/gui.tcl @@ -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 Edit +$tree tag configure selected -background white -foreground black +$tree_work tag configure selected -background white -foreground black + +bind $tree_work { + $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 + diff --git a/lib/ttk_theme_dark.tcl b/lib/ttk_theme_dark.tcl index 87f6442..e4c06c3 100644 --- a/lib/ttk_theme_dark.tcl +++ b/lib/ttk_theme_dark.tcl @@ -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:: { } } + +