Skip to content

Commit

Permalink
QWindows11Style: Reduce groove size of QSlider
Browse files Browse the repository at this point in the history
Reduce the groove size of QSlider when using Windows11Style, so that the
minimum selectable value does appear so.

Fixes: QTBUG-133128
Pick-to: 6.9 6.8
Change-Id: I3e5a5378e2eace3920c06db8cb1198122c0937b5
Reviewed-by: Christian Ehrlicher <[email protected]>
  • Loading branch information
Wladimir Leuschner committed Jan 24, 2025
1 parent dbf44b6 commit dee731a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/styles/modernwindows/qwindows11style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

Expand Down

0 comments on commit dee731a

Please sign in to comment.