From c1d57f8a74547d65efcee7a4b486fe4acf52dd61 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sat, 21 Feb 2009 11:38:56 +0000 Subject: Correct the ttk::treeview border on XP and Vista. --- ChangeLog | 3 +++ library/ttk/vistaTheme.tcl | 6 ++++-- win/ttkWinXPTheme.c | 12 +++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44a05fb..cb46dfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-02-21 Pat Thoyts + * library/ttk/vistaTheme.tcl: Correct the ttk::treeview border on + * win/ttkWinXpTheme.c: XP and vista. + * library/console.tcl: [Bug 2546087] In 2004 a fix to Tcl channels prevented the exposure of the internal UTF-8 representation of the ASCII NUL character (\uc080). Since then strings in the console diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index d8f9cbc..76f3e3e 100644 --- a/library/ttk/vistaTheme.tcl +++ b/library/ttk/vistaTheme.tcl @@ -198,7 +198,9 @@ namespace eval ttk::theme::vista { } } - - package provide ttk::theme::vista 1.0 + # Treeview + ttk::style configure Item -padding {4 0 0 0} + + package provide ttk::theme::vista 1.0 } } \ No newline at end of file diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 2f5648f..5930481 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkWinXPTheme.c,v 1.22 2008/12/05 11:11:58 patthoyts Exp $ + * $Id: ttkWinXPTheme.c,v 1.23 2009/02/21 11:38:56 patthoyts Exp $ * * Tk theme engine which uses the Windows XP "Visual Styles" API * Adapted from Georgios Petasis' XP theme patch. @@ -751,6 +751,14 @@ static Ttk_StateTable header_statemap[] = { HIS_NORMAL, 0,0 }, }; +static Ttk_StateTable treeview_statemap[] = +{ + { TREIS_DISABLED, TTK_STATE_DISABLED, 0 }, + { TREIS_SELECTED, TTK_STATE_SELECTED, 0}, + { TREIS_HOT, TTK_STATE_ACTIVE, 0 }, + { TREIS_NORMAL, 0,0 }, +}; + static Ttk_StateTable tvpglyph_statemap[] = { { GLPS_OPENED, TTK_STATE_OPEN, 0 }, @@ -997,6 +1005,8 @@ static ElementInfo ElementInfoTable[] = { TP_SPLITBUTTON,toolbutton_statemap, NOPAD,0 }, { "Menubutton.dropdown", &GenericElementSpec, L"TOOLBAR", TP_SPLITBUTTONDROPDOWN,toolbutton_statemap, NOPAD,0 }, + { "Treeview.field", &GenericElementSpec, L"TREEVIEW", + TVP_TREEITEM, treeview_statemap, PAD(1, 1, 1, 1), 0 }, { "Treeitem.indicator", &TreeIndicatorElementSpec, L"TREEVIEW", TVP_GLYPH, tvpglyph_statemap, PAD(1,1,6,0), PAD_MARGINS }, { "Treeheading.border", &GenericElementSpec, L"HEADER", -- cgit v0.12