summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglpaintdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglpaintdevice.cpp')
-rw-r--r--src/gui/opengl/qopenglpaintdevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp
index d55d6a91bf..1e427c9dd6 100644
--- a/src/gui/opengl/qopenglpaintdevice.cpp
+++ b/src/gui/opengl/qopenglpaintdevice.cpp
@@ -282,9 +282,11 @@ int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
case PdmDpiY:
return qRound(d_ptr->dpmy * 0.0254);
case PdmPhysicalDpiX:
- return qRound(d_ptr->dpmx * 0.0254 * d_ptr->devicePixelRatio);
+ return qRound(d_ptr->dpmx * 0.0254);
case PdmPhysicalDpiY:
- return qRound(d_ptr->dpmy * 0.0254 * d_ptr->devicePixelRatio);
+ return qRound(d_ptr->dpmy * 0.0254);
+ case PdmDevicePixelRatio:
+ return 1;
default:
qWarning("QOpenGLPaintDevice::metric() - metric %d not known", metric);
return 0;