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>
This commit is contained in:
parent
63a0d263cf
commit
aac33296e6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user