delete m_DCPtr;
}
-void wxDataViewCustomRenderer::RenderText( const wxString &text, int xoffset, wxRect cell, wxDC *dc, int state )
-{
- wxDataViewCtrl *view = GetOwner()->GetOwner();
-
- wxColour col = (state & wxDATAVIEW_CELL_SELECTED) ? *wxWHITE : view->GetForegroundColour();
- dc->SetTextForeground(col);
- dc->DrawText( text, cell.x + xoffset, cell.y + ((cell.height - dc->GetCharHeight()) / 2));
-}
-
wxDC* wxDataViewCustomRenderer::GetDC()
{
if ((m_DCPtr == NULL) && (GetOwner() != NULL) && (GetOwner()->GetOwner() != NULL))
attr.colFg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
attr.colBg = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX );
- attr.font.CreateSystemFont(wxOSX_SYSTEM_FONT_VIEWS);
+ static wxFont font = wxFont(wxOSX_SYSTEM_FONT_VIEWS);
+ attr.font = font;
return attr;
}