From cdebf9851e4571f1972c24f22e7bf0d60b6f818f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 6 Aug 2001 19:49:37 +0000 Subject: [PATCH] use item colour when drawing the focused item if we don't highlight it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectlg.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 0b9e91d4e2..ed745c827f 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1916,23 +1916,20 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level } } - wxPen *pen = wxTRANSPARENT_PEN; - wxColour colText; - + wxPen *pen; +#ifndef __WXMAC__ + // don't draw rect outline if we already have the background color + // under Max if ( item->IsSelected() ) - { pen = wxBLACK_PEN; - - if ( m_hasFocus ) - { - colText = wxSystemSettings:: - GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ); - } - -#ifdef __WXMAC__ - // no rect outline, we already have the background color + else +#endif // !__WXMAC__ pen = wxTRANSPARENT_PEN; -#endif + + wxColour colText; + if ( item->IsSelected() && m_hasFocus ) + { + colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ); } else { -- 2.45.2