From 6a6a1c0fe2f39f560bae4bb71eb48d9dae993231 Mon Sep 17 00:00:00 2001 From: Wladimir Leuschner Date: Fri, 24 Jan 2025 12:10:47 +0100 Subject: [PATCH] QWindows11Style: Reduce groove size of QSlider Reduce the groove size of QSlider when using Windows11Style, so that the minimum selectable value does appear so. Fixes: QTBUG-133128 Pick-to: 6.8 Change-Id: I3e5a5378e2eace3920c06db8cb1198122c0937b5 Reviewed-by: Christian Ehrlicher (cherry picked from commit dee731ae981eb4f41f4b00be80f75c7a0a5c0e11) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/styles/modernwindows/qwindows11style.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index 5b4b4767394..de304b0714c 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -317,11 +317,11 @@ void QWindows11Style::drawComplexControl(ComplexControl control, const QStyleOpt if (slider->orientation == Qt::Horizontal) { rect = QRect(slrect.left(), rect.center().y() - 2, slrect.width() - 5, 4); - leftRect = QRect(rect.left(), rect.top(), (handlePos.x() - rect.left()), rect.height()); + leftRect = QRect(rect.left() + 1, rect.top(), (handlePos.x() - rect.left()), rect.height()); rightRect = QRect(handlePos.x(), rect.top(), (rect.width() - handlePos.x()), rect.height()); } else { rect = QRect(rect.center().x() - 2, slrect.top(), 4, slrect.height() - 5); - rightRect = QRect(rect.left(), rect.top(), rect.width(), (handlePos.y() - rect.top())); + rightRect = QRect(rect.left(), rect.top() + 1, rect.width(), (handlePos.y() - rect.top())); leftRect = QRect(rect.left(), handlePos.y(), rect.width(), (rect.height() - handlePos.y())); }