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
This commit is contained in:
@@ -721,6 +721,11 @@ public:
|
|||||||
return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush;
|
return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HasFocus() const
|
||||||
|
{
|
||||||
|
return m_hasFocus;
|
||||||
|
}
|
||||||
|
|
||||||
//protected:
|
//protected:
|
||||||
// the array of all line objects for a non virtual list control (for the
|
// the array of all line objects for a non virtual list control (for the
|
||||||
// virtual list control we only ever use m_lines[0])
|
// virtual list control we only ever use m_lines[0])
|
||||||
@@ -1381,7 +1386,12 @@ bool wxListLineData::SetAttributes(wxDC *dc,
|
|||||||
wxColour colText;
|
wxColour colText;
|
||||||
if ( highlighted )
|
if ( highlighted )
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
|
{
|
||||||
|
if (m_owner->HasFocus())
|
||||||
colText = *wxWHITE;
|
colText = *wxWHITE;
|
||||||
|
else
|
||||||
|
colText = *wxBLACK;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user