From: Kevin Ollivier Date: Thu, 9 Nov 2006 20:15:18 +0000 (+0000) Subject: On Mac, when selection is drawn in grey (i.e. unfocused), text color needs to be... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d6d8b172806a21e5c5c341f75b0f1213d5d52e94 On Mac, when selection is drawn in grey (i.e. unfocused), text color needs to be black. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 3ea1dcafb6..e5cd552ab0 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -720,6 +720,11 @@ public: { return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush; } + + bool HasFocus() const + { + return m_hasFocus; + } //protected: // the array of all line objects for a non virtual list control (for the @@ -1381,7 +1386,12 @@ bool wxListLineData::SetAttributes(wxDC *dc, wxColour colText; if ( highlighted ) #ifdef __WXMAC__ - colText = *wxWHITE; + { + if (m_owner->HasFocus()) + colText = *wxWHITE; + else + colText = *wxBLACK; + } #else colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); #endif