From 11b3105abf3164f2440965256c9edc55dac97a1c Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 16 Oct 2007 20:54:00 +0000 Subject: [PATCH] Correct text colour in wxIconTextRenderer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 6409099be6..7c60861449 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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())