Correct text colour in wxIconTextRenderer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2007-10-16 20:54:00 +00:00
parent cc28f5ecd0
commit 11b3105abf

View File

@ -1025,7 +1025,15 @@ bool wxDataViewIconTextRenderer::GetValue( wxVariant &value ) const
bool wxDataViewIconTextRenderer::Render( wxRect cell, wxDC *dc, int state )
{
dc->SetFont( GetOwner()->GetOwner()->GetFont() );
wxDataViewCtrl *view = GetOwner()->GetOwner();
dc->SetFont( view->GetFont() );
wxColour col = (state & wxDATAVIEW_CELL_SELECTED) ?
wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT) :
view->GetForegroundColour();
dc->SetTextForeground(col);
const wxIcon &icon = m_value.GetIcon();
if (icon.IsOk())