QOpenGLPaintDevice: correct painting on retina.

Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio)
return d->devicePixelRatio instead of 1.

Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Morten Johan Sørvig 2013-04-16 16:02:14 +02:00 committed by The Qt Project
parent acfccd0483
commit e25db96884

View File

@ -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;