From 0e0295f9bd8cc412914dd778e9ff2aa896292110 Mon Sep 17 00:00:00 2001 From: "patthoyts@users.sourceforge.net" Date: Thu, 3 Dec 2009 23:58:34 +0000 Subject: Fix the selection of treeview rows on Windows XP and Vista --- ChangeLog | 7 ++++++- library/ttk/vistaTheme.tcl | 12 ++++++++++++ library/ttk/xpTheme.tcl | 14 +++++++++++++- win/ttkWinXPTheme.c | 8 ++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28182b5..f5c1772 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ +2009-12-03 Pat Thoyts + + * library/ttk/xpTheme.tcl: Fix selection of treeview rows on + * library/ttk/vistaTheme.tcl: Windows XP and Vista. + 2009-12-02 Jan Nijtmans * doc/GetHINSTANCE.3 correct mentioned header file * win/tkWinInt.h make TkWinChildProc available in private - * generic/tkInt.decls stub table. [Bug #220600] and [Bug #220690]. + * generic/tkInt.decls stub table. [Bug #220600] and [Bug #220690]. * generic/tkIntPlatDecls.h (regenerated) * generic/tkStubInit.c (regenerated) diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index b96f4a7..9b9418d 100644 --- a/library/ttk/vistaTheme.tcl +++ b/library/ttk/vistaTheme.tcl @@ -57,6 +57,18 @@ namespace eval ttk::theme::vista { -background [list selected SystemHighlight] \ -foreground [list selected SystemHighlightText] ; + ttk::style configure Row -background SystemWindow + ttk::style configure Cell -background SystemWindow + ttk::style map Row \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + ttk::style map Cell \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + ttk::style map Item \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + # Label and Toolbutton ttk::style configure TLabelframe.Label -foreground "#0046d5" diff --git a/library/ttk/xpTheme.tcl b/library/ttk/xpTheme.tcl index 9b1c697..8a0400e 100644 --- a/library/ttk/xpTheme.tcl +++ b/library/ttk/xpTheme.tcl @@ -1,5 +1,5 @@ # -# $Id: xpTheme.tcl,v 1.6.2.2 2009/05/14 00:53:04 patthoyts Exp $ +# $Id: xpTheme.tcl,v 1.6.2.3 2009/12/03 23:58:35 patthoyts Exp $ # # Settings for 'xpnative' theme # @@ -36,6 +36,18 @@ namespace eval ttk::theme::xpnative { -background [list selected SystemHighlight] \ -foreground [list selected SystemHighlightText] ; + ttk::style configure Row -background SystemWindow + ttk::style configure Cell -background SystemWindow + ttk::style map Row \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + ttk::style map Cell \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + ttk::style map Item \ + -background [list selected SystemHighlight] \ + -foreground [list selected SystemHighlightText] ; + ttk::style configure TLabelframe.Label -foreground "#0046d5" # OR: -padding {3 3 3 6}, which some apps seem to use. diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 0c5369c..5502206 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkWinXPTheme.c,v 1.18.2.1 2009/05/14 00:53:04 patthoyts Exp $ + * $Id: ttkWinXPTheme.c,v 1.18.2.2 2009/12/03 23:58:35 patthoyts Exp $ * * Tk theme engine which uses the Windows XP "Visual Styles" API * Adapted from Georgios Petasis' XP theme patch. @@ -27,7 +27,11 @@ int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) { return TCL_OK; } #include #include -#include +#ifdef HAVE_VSSYM32_H +# include +#else +# include +#endif #include -- cgit v0.12