Skip to content

Commit

Permalink
Adjust minHeight if necessary when indicatorDiameter is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
idpaterson committed Oct 24, 2013
1 parent 757b6ca commit a9ef585
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SMPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,12 @@ - (void)setIndicatorDiameter:(CGFloat)indicatorDiameter
if (indicatorDiameter == _indicatorDiameter) {
return;
}

// Absolute minimum height of the control is the indicator diameter
if (_minHeight < indicatorDiameter) {
_minHeight = indicatorDiameter;
[self setNeedsLayout];
}

_indicatorDiameter = indicatorDiameter;
[self _updateMeasuredIndicatorSizes];
Expand Down

0 comments on commit a9ef585

Please sign in to comment.