summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <[email protected]>2024-11-06 21:11:47 +0100
committerChristian Ehrlicher <[email protected]>2024-11-06 23:08:42 +0100
commitcb9d8226d77103212618125867b4f9d657c57f9b (patch)
treef2e5f9175ed115527c2ad01f1b962b10123ed20d
parent0a1c1711453697a88eee7fdb6f4cf082bfd433e2 (diff)
QCachedPainter: fix pixmapRect() for dpr != 1
Return the correct (device independent) size of the pixmap rect. This amends 75617efe238bb20e9a0e1d12a1a8bf5d6f6819e1. Task-number: QTBUG-129680 Change-Id: I19ed4665143824204de77e01ae47772d79fbf0ff Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r--src/widgets/styles/qstyle_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h
index ff8a2060522..2df2757c4e7 100644
--- a/src/widgets/styles/qstyle_p.h
+++ b/src/widgets/styles/qstyle_p.h
@@ -57,7 +57,8 @@ public:
}
QRect pixmapRect() const
{
- return QRect(0, 0, m_pixmap.width(), m_pixmap.height());
+ const auto sz = m_pixmap.deviceIndependentSize();
+ return QRect(0, 0, sz.width(), sz.height());
}
QPainter *operator->()
{