From a36c84c6a3dca29afdb7741b16975c108be341ab Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 14 Oct 2021 13:24:50 +0200 Subject: 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 --- src/gui/image/qpixmap.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/image') 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); -- cgit v1.2.3