summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorIceyer Lee <iceyer@gmail.com>2017-09-18 11:46:51 +0800
committerIceyer <me@iceyer.net>2017-09-21 06:41:13 +0000
commit72188001bbb408be22e5ad0fc90ca13b97c408f8 (patch)
treec0de10cc74a0982555c6a16c7e30e03cd1e3bbc8 /src/widgets
parent92ca09147fc239762927595165f71a0d1ecff98f (diff)
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>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 53b240d4d2..9b6c3df828 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -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);