Permalink
Browse files

enforce a minimum width for the progress bar's fill

  • Loading branch information...
1 parent 24991ce commit 36e4a81229d1ccb4988e7995e4add47a1e128038 @joshaber joshaber committed Jul 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/UIKit/TUIProgressBar.m
@@ -216,8 +216,9 @@ - (CGRect)fillRect
if (drawingProgress > 1.0)
drawingProgress = 1.0;
+ static const CGFloat minimumWidth = 10.0f;
CGRect fillRect = self.bounds;
- fillRect.size.width = ceil(drawingProgress * fillRect.size.width);
+ fillRect.size.width = MAX(ceil(drawingProgress * fillRect.size.width), minimumWidth);
CGFloat delta = (self.style == TUIProgressBarStyleGray ? 0.5 : 1.5);
fillRect = CGRectInset(fillRect, delta, delta);

0 comments on commit 36e4a81

Please sign in to comment.