implement wxDC::GetContentScaleFactor() for GTK3

This commit is contained in:
Paul Cornett
2016-02-22 09:52:26 -08:00
parent e5c93ad674
commit 6674ca57da
5 changed files with 23 additions and 10 deletions

View File

@@ -2492,17 +2492,19 @@ wxDC *wxDataViewCustomRenderer::GetDC()
{
if (m_dc == NULL)
{
wxDataViewCtrl* ctrl = NULL;
wxDataViewColumn* column = GetOwner();
if (column)
ctrl = column->GetOwner();
#ifdef __WXGTK3__
wxASSERT(m_renderParams);
cairo_t* cr = m_renderParams->cr;
wxASSERT(cr && cairo_status(cr) == 0);
m_dc = new wxGTKCairoDC(cr);
m_dc = new wxGTKCairoDC(cr, ctrl);
#else
if (GetOwner() == NULL)
if (ctrl == NULL)
return NULL;
if (GetOwner()->GetOwner() == NULL)
return NULL;
m_dc = new wxDataViewCtrlDC( GetOwner()->GetOwner() );
m_dc = new wxDataViewCtrlDC(ctrl);
#endif
}