summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/styles/modernwindows/qwindows11style.cpp20
1 files changed, 3 insertions, 17 deletions
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<const QStyleOptionSlider *>(option)) {
- if (scrollbar->orientation == Qt::Vertical) {
+ if (scrollbar->orientation == Qt::Vertical)
ret = ret.adjusted(2,2,-2,-3);
- } else {
- ret = ret.adjusted(3,2,-2,-2);
- }
- }
- break;
- case QStyle::SC_ScrollBarSubLine:
- if (const QStyleOptionSlider *scrollbar = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
- if (scrollbar->orientation == Qt::Vertical) {
- ret = ret.adjusted(2,2,-2,-3);
- } else {
+ else
ret = ret.adjusted(3,2,-2,-2);
- }
}
- break;
- default:
- break;
}
break;
}