Fix for #12979: wrong unfocused selected text colour in wxTreeCtrl/wxListCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@67011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2011-02-24 10:02:44 +00:00
parent a2abbb1cc9
commit fbf2343ea0
2 changed files with 18 additions and 0 deletions

View File

@@ -1426,8 +1426,17 @@ bool wxListLineData::SetAttributes(wxDC *dc,
else
colText = *wxBLACK;
}
#else
{
#ifdef __WXGTK__
if (m_owner->HasFocus())
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
else
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTIONTEXT);
#else
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
#endif
}
#endif
else if ( attr && attr->HasTextColour() )
colText = attr->GetTextColour();

View File

@@ -2549,7 +2549,16 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
#ifdef __WXMAC__
colText = *wxWHITE;
#else
#ifdef __WXGTK__
if (m_hasFocus)
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
else
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTIONTEXT);
#else
colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
#endif
#endif
}
else