diff options
Diffstat (limited to 'src/gui/kernel/qpaintdevicewindow.cpp')
-rw-r--r-- | src/gui/kernel/qpaintdevicewindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qpaintdevicewindow.cpp b/src/gui/kernel/qpaintdevicewindow.cpp index ff661d017d..cd894866c3 100644 --- a/src/gui/kernel/qpaintdevicewindow.cpp +++ b/src/gui/kernel/qpaintdevicewindow.cpp @@ -155,8 +155,10 @@ int QPaintDeviceWindow::metric(PaintDeviceMetric metric) const return qRound(screen->physicalDotsPerInchY()); break; case PdmDevicePixelRatio: - if (screen) - return screen->devicePixelRatio(); + return int(QWindow::devicePixelRatio()); + break; + case PdmDevicePixelRatioScaled: + return int(QWindow::devicePixelRatio() * devicePixelRatioFScale()); break; default: break; |