correct ppi implementation in wxqtdc
This commit is contained in:
committed by
Vadim Zeitlin
parent
2a2e17c050
commit
bf9eacad16
@@ -133,9 +133,10 @@ int wxQtDCImpl::GetDepth() const
|
|||||||
wxSize wxQtDCImpl::GetPPI() const
|
wxSize wxQtDCImpl::GetPPI() const
|
||||||
{
|
{
|
||||||
QScreen *srn = QApplication::screens().at(0);
|
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(round(dotsPerInch), round(dotsPerInch));
|
||||||
// return wxSize(m_qtPainter->device()->logicalDpiX(), m_qtPainter->device()->logicalDpiY());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxQtDCImpl::SetFont(const wxFont& font)
|
void wxQtDCImpl::SetFont(const wxFont& font)
|
||||||
|
Reference in New Issue
Block a user