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:
@@ -1025,7 +1025,15 @@ bool wxDataViewIconTextRenderer::GetValue( wxVariant &value ) const
|
|||||||
|
|
||||||
bool wxDataViewIconTextRenderer::Render( wxRect cell, wxDC *dc, int state )
|
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();
|
const wxIcon &icon = m_value.GetIcon();
|
||||||
if (icon.IsOk())
|
if (icon.IsOk())
|
||||||
|
Reference in New Issue
Block a user