correct ppi implementation in wxqtdc

This commit is contained in:
Sean D'Epagnier
2016-09-12 11:58:47 -04:00
committed by Vadim Zeitlin
parent 2a2e17c050
commit bf9eacad16

View File

@@ -133,9 +133,10 @@ int wxQtDCImpl::GetDepth() const
wxSize wxQtDCImpl::GetPPI() const
{
QScreen *srn = QApplication::screens().at(0);
qreal dotsPerInch = (qreal)srn->logicalDotsPerInch();
if (!srn)
return wxSize(m_qtPainter->device()->logicalDpiX(), m_qtPainter->device()->logicalDpiY());
qreal dotsPerInch = srn->logicalDotsPerInch();
return wxSize(round(dotsPerInch), round(dotsPerInch));
// return wxSize(m_qtPainter->device()->logicalDpiX(), m_qtPainter->device()->logicalDpiY());
}
void wxQtDCImpl::SetFont(const wxFont& font)