X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de40d7364730fd9556620ea5411689dad1c9e28a..e5dcae09e6c207688b41c8b744764d32b7b39a46:/src/osx/dataview_osx.cpp?ds=sidebyside diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 9ffcb8af46..91c22b7e43 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -303,15 +303,6 @@ wxDataViewCustomRenderer::~wxDataViewCustomRenderer() 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)) @@ -623,7 +614,8 @@ wxDataViewCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) 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; }