summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2019-03-28 16:49:57 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2019-04-01 15:21:18 +0000
commit685b8db13aa19e734f239678bae23607fcededbd (patch)
tree0883b9f72f93b6ec2dca9d3f678fdedaa2eecb44 /src/gui
parent954b73445cfbfef01207d51d1b986c6dd796c6d0 (diff)
Forward devicePixelRatio in QPixmap::mask()
Also add a test checking that devicePixelRatio is forwarded to derivatives of QPixmap. Change-Id: Idb2b3f033ccc0fd49bf54b11f5dffbce5a19b006 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qplatformpixmap.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qplatformpixmap.cpp b/src/gui/image/qplatformpixmap.cpp
index 2209c3de4d..a2e01147c4 100644
--- a/src/gui/image/qplatformpixmap.cpp
+++ b/src/gui/image/qplatformpixmap.cpp
@@ -178,6 +178,7 @@ QBitmap QPlatformPixmap::mask() const
if (mask.isNull()) // allocation failed
return QBitmap();
+ mask.setDevicePixelRatio(devicePixelRatio());
mask.setColorCount(2);
mask.setColor(0, QColor(Qt::color0).rgba());
mask.setColor(1, QColor(Qt::color1).rgba());