summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qwizard_win.cpp
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2023-06-21 14:48:49 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-06-27 16:36:06 +0000
commitc0e48ed645f68e714e982064540d710676a0738b (patch)
tree53d0ea0668a0a532f049a5e28341fde7de981f08 /src/widgets/dialogs/qwizard_win.cpp
parent530d092eae0579bbb88e95f853715cac214da636 (diff)
QWizard: Support fractional DPR on Windows
We were storing the DPR as int; change to qreal. Task-number: QTBUG-114175 Pick-to: 6.2 6.5 6.6 Change-Id: I7dc7df82f584cddbbb3f690f1df74e7a30369ab2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qwizard_win.cpp')
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 34708c3e8d..2c4f049e88 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -33,7 +33,7 @@ Q_DECLARE_METATYPE(QMargins)
QT_BEGIN_NAMESPACE
-int QVistaHelper::m_devicePixelRatio = 1;
+qreal QVistaHelper::m_devicePixelRatio = 1.0;
/******************************************************************************
** QVistaBackButton
@@ -82,7 +82,7 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
RECT clipRect;
int xoffset = origin.x() + QWidget::mapToParent(r.topLeft()).x() - 1;
int yoffset = origin.y() + QWidget::mapToParent(r.topLeft()).y() - 1;
- const int dpr = devicePixelRatio();
+ const qreal dpr = devicePixelRatio();
const QRect rDp = QRect(r.topLeft() * dpr, r.size() * dpr);
const int xoffsetDp = xoffset * dpr;
const int yoffsetDp = yoffset * dpr;