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
parent
92ca09147f
commit
72188001bb
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue