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>
This commit is contained in:
Morten Sørvig 2023-06-21 14:48:49 +02:00 committed by Tor Arne Vestbø
parent 530d092eae
commit c0e48ed645
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -110,7 +110,7 @@ private:
int titleBarOffset; // Extra spacing above the text
int iconSpacing; // Space between button and icon
static int m_devicePixelRatio;
static qreal m_devicePixelRatio;
};