diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index f84a2e06fdb..6ca4291feeb 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -2026,27 +2026,13 @@ QRect QWindows11Style::subControlRect(ComplexControl control, const QStyleOption { ret = QCommonStyle::subControlRect(control, option, subControl, widget); - switch (subControl) { - case QStyle::SC_ScrollBarAddLine: + if (subControl == SC_ScrollBarAddLine || subControl == SC_ScrollBarSubLine) { if (const QStyleOptionSlider *scrollbar = qstyleoption_cast(option)) { - if (scrollbar->orientation == Qt::Vertical) { + if (scrollbar->orientation == Qt::Vertical) ret = ret.adjusted(2,2,-2,-3); - } else { + else ret = ret.adjusted(3,2,-2,-2); - } } - break; - case QStyle::SC_ScrollBarSubLine: - if (const QStyleOptionSlider *scrollbar = qstyleoption_cast(option)) { - if (scrollbar->orientation == Qt::Vertical) { - ret = ret.adjusted(2,2,-2,-3); - } else { - ret = ret.adjusted(3,2,-2,-2); - } - } - break; - default: - break; } break; }