summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-11 00:24:46 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-13 13:55:01 +0100
commit515822de24e45e9c6d8d59b74c557640ba68a6ba (patch)
treea10623e2f97b54ed8e57c568fc70d32a0c6560f8 /src/gui/painting
parentd21bfee667ce0c6a6c66bb1d1c9481af5816eb97 (diff)
QBackingStore: Take DPR into account when resizing with static contents
The plumbing from QBackingStore::resize to the platform backing store was missing a high-DPI conversion for the backing store's static contents, which is also expressed in the QtGui coordinate system. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Ifaac916cbf184b9386aa5feca1577a53bf2906ed Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qbackingstore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index f609cddd3c..586c19885e 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -230,7 +230,8 @@ void QBackingStore::flush(const QRegion &region, QWindow *window, const QPoint &
void QBackingStore::resize(const QSize &size)
{
d_ptr->size = size;
- handle()->resize(QHighDpi::scale(size, d_ptr->deviceIndependentToNativeFactor()), d_ptr->staticContents);
+ const qreal factor = d_ptr->deviceIndependentToNativeFactor();
+ handle()->resize(QHighDpi::scale(size, factor), QHighDpi::scale(d_ptr->staticContents, factor));
}
/*!