From e25db968846432f087ca800048f5337fd534c159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 16 Apr 2013 16:02:14 +0200 Subject: QOpenGLPaintDevice: correct painting on retina. Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio) return d->devicePixelRatio instead of 1. Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66 Reviewed-by: Richard Moe Gustavsen --- src/gui/opengl/qopenglpaintdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp index 1e427c9dd6..f0e7e4953f 100644 --- a/src/gui/opengl/qopenglpaintdevice.cpp +++ b/src/gui/opengl/qopenglpaintdevice.cpp @@ -286,7 +286,7 @@ int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const case PdmPhysicalDpiY: return qRound(d_ptr->dpmy * 0.0254); case PdmDevicePixelRatio: - return 1; + return d_ptr->devicePixelRatio; default: qWarning("QOpenGLPaintDevice::metric() - metric %d not known", metric); return 0; -- cgit v1.2.3