From d0b4ee07078a1cc6140a2151c9d466abbcb13567 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 19 Mar 2023 15:05:42 +0100 Subject: [PATCH] QFusionStyle: adjust painting of separator in QSpinBox When use a very high devicePixelRatio (for testing I used 5.23) one could see that the separator in the QSpinBox was not long enough. Change-Id: I3a86c5bb695c95051b8b9294ca8a2749a8c3f9eb Reviewed-by: Eirik Aavitsland (cherry picked from commit e9512c46da50e374c960135f1804cb3f234d923f) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/styles/qfusionstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index dccfbd8aac1..0ae27a9bb86 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -2044,9 +2044,9 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption // and a tiny rect painted in the corner. cachePainter.setPen(outline); if (spinBox->direction == Qt::RightToLeft) - cachePainter.drawLine(upRect.right(), upRect.top() - 1, upRect.right(), downRect.bottom() + 1); + cachePainter.drawLine(QLineF(upRect.right(), upRect.top() - 0.5, upRect.right(), downRect.bottom() + 1.5)); else - cachePainter.drawLine(upRect.left(), upRect.top() - 1, upRect.left(), downRect.bottom() + 1); + cachePainter.drawLine(QLineF(upRect.left(), upRect.top() - 0.5, upRect.left(), downRect.bottom() + 1.5)); } if (upIsActive && sunken) {