From: Robin Dunn Date: Mon, 9 Jan 2006 02:57:04 +0000 (+0000) Subject: Fix for wxMac when the tree doesn't have the focus and the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/633ecf268b2ebb1c453cf63e05e49e968092812a?ds=inline Fix for wxMac when the tree doesn't have the focus and the wxSYS_COLOUR_HIGHLIGHTTEXT is white. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 9f014eb75e..2e2650bfed 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2333,7 +2333,15 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level wxTRANSPARENT_PEN; wxColour colText; - if ( item->IsSelected() ) + if ( item->IsSelected() +#ifdef __WXMAC__ + // On wxMac, if the tree doesn't have the focus we draw an empty + // rectangle, so we want to make sure that the text is visible + // against the normal background, not the highlightbackground, so + // don't use the highlight text colour unless we have the focus. + && m_hasFocus +#endif + ) { colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); }