diff options
author | Morten Sørvig <morten.sorvig@qt.io> | 2021-08-16 08:41:57 +0200 |
---|---|---|
committer | Morten Sørvig <morten.sorvig@qt.io> | 2021-09-01 15:24:05 +0200 |
commit | 81a7344e1dea562271865ddf94a7d7138e663ce4 (patch) | |
tree | 3289768b62776ec2d93619043253955aad169843 /src/gui/kernel | |
parent | 4e460aa3f7fb5aa2f66a2a75b0aea82464ee5639 (diff) |
Port to QImage and QPixmap deviceIndependentSize()
Replace the “size() / devicePixelRatio()” pattern with
a call to deviceIndependentSize().
Change-Id: I9d9359e80b9e6643e7395028cd43e3261d449ae7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qshapedpixmapdndwindow.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/kernel/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp index e58d37693a..490860342d 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow.cpp +++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp @@ -104,9 +104,7 @@ void QShapedPixmapWindow::updateGeometry(const QPoint &pos) { QSize size(1, 1); if (!m_pixmap.isNull()) { - size = qFuzzyCompare(m_pixmap.devicePixelRatio(), qreal(1.0)) - ? m_pixmap.size() - : (QSizeF(m_pixmap.size()) / m_pixmap.devicePixelRatio()).toSize(); + size = m_pixmap.deviceIndependentSize().toSize(); } setGeometry(QRect(pos - m_hotSpot, size)); } |