summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/mac/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-03-10 12:22:32 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-03-18 08:35:54 +0000
commitaac33296e618e617ab9e05b3c71682a13f2d5dfc (patch)
treeac8098f2fa5b5dbff13db5e33ea0f7c7446abcbc /src/plugins/styles/mac/qmacstyle_mac.mm
parent63a0d263cf233ddf85a60678829298b50e8d1f26 (diff)
macOS: Don't draw scrollbar handle when there is no range
If the minimum and maximum is set to be the same then we should not draw the handle. An empty groove should be shown instead. Pick-to: 6.1 6.0 5.15 Change-Id: Ie79f55cd761f9a8f614967c40c23a7f59e700a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac.mm')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index dad81dc8a1..10a2da4a90 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -5181,7 +5181,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
if (const QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
const bool drawTrack = sb->subControls & SC_ScrollBarGroove;
- const bool drawKnob = sb->subControls & SC_ScrollBarSlider;
+ const bool drawKnob = sb->subControls & SC_ScrollBarSlider && sb->minimum != sb->maximum;
if (!drawTrack && !drawKnob)
break;