Skip to content

Commit

Permalink
Merge "macOS: Don't draw scrollbar handle when there is no range"
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyShawQt authored and Qt CI Bot committed Mar 18, 2021
2 parents f49c6a5 + aac3329 commit 4c6949d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/styles/mac/qmacstyle_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -5181,7 +5181,7 @@ static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect
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;

Expand Down

0 comments on commit 4c6949d

Please sign in to comment.