Fix QGraphicsEffect draw error size in decimal scale factor

When QT_SCALE_FACTOR=1.5 or other decimal, QWidget
draw QGraphicsEffect in error size. Use QPaintDevice::devicePixelRatioF
instead QPaintDevice::devicePixelRatio() will fix it.

Change-Id: I423e224d73b948ecdeca0e6b24c51f12a724a0ba
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Iceyer Lee 2017-09-18 11:46:51 +08:00 committed by Iceyer
parent 92ca09147f
commit 72188001bb
1 changed files with 1 additions and 1 deletions

View File

@ -5924,7 +5924,7 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
pixmapOffset -= effectRect.topLeft();
const qreal dpr = context->painter->device()->devicePixelRatio();
const qreal dpr = context->painter->device()->devicePixelRatioF();
QPixmap pixmap(effectRect.size() * dpr);
pixmap.setDevicePixelRatio(dpr);