summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-10-14 13:24:50 +0200
committerAndy Shaw <andy.shaw@qt.io>2021-10-15 10:27:15 +0200
commita36c84c6a3dca29afdb7741b16975c108be341ab (patch)
tree95395aeafe0fc8ad35af66488cdb38cb52fa40f1 /src/gui/image
parented3e1ecb2797651c64a7bb88c2c73e83e212190e (diff)
When filling a pixmap after an assignment ensure the set DPR is not lost
Pick-to: 6.2 5.15 Change-Id: I649547ea277f9d074e6638e4b7b1206d3d3d976b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index df05bcc76d..4bfdbd9253 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -899,6 +899,7 @@ void QPixmap::fill(const QColor &color)
// it will be filled with new pixel data anyway.
QPlatformPixmap *d = data->createCompatiblePlatformPixmap();
d->resize(data->width(), data->height());
+ d->setDevicePixelRatio(data->devicePixelRatio());
data = d;
}
data->fill(color);