From 30f6ec18b6af9bef632b3df6c7f6086b97bdcf6c Mon Sep 17 00:00:00 2001 From: Cyan Ogilvie Date: Fri, 20 Jun 2008 16:40:49 +0200 Subject: [PATCH] Made Browse_tktreectrl column header background track ttk theme changes --- scripts/browse_tktreectrl.itcl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/browse_tktreectrl.itcl b/scripts/browse_tktreectrl.itcl index 26c15b8..a2d419f 100644 --- a/scripts/browse_tktreectrl.itcl +++ b/scripts/browse_tktreectrl.itcl @@ -70,6 +70,7 @@ class tlc::Browse_tktreectrl { method filter_changed {filterdata} method sortcolumn {wid col} method recheck_states {} + method fix_header_bg {} } } @@ -132,6 +133,8 @@ body tlc::Browse_tktreectrl::constructor {args} { #<<<1 keep -usetheme -width -wrap -orient -xscrolldelay -xscrollincrement keep -yscrolldelay -yscrollincrement } + fix_header_bg + bind $w.list <> [code $this fix_header_bg] define_style basic { $T element create name_bg rect \ @@ -633,3 +636,10 @@ body tlc::Browse_tktreectrl::auxdata_clear {key} { #<<<1 } +body tlc::Browse_tktreectrl::fix_header_bg {} { #<<<1 + # Called when the ttk theme changes + set newchrome [ttk::style lookup $::ttk::currentTheme -background] + $w.list column configure all -background $newchrome +} + + -- 2.11.4.GIT