Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

enforce a minimum width for the progress bar's fill

  • Loading branch information...
commit 36e4a81229d1ccb4988e7995e4add47a1e128038 1 parent 24991ce
@joshaber joshaber authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/UIKit/TUIProgressBar.m
View
3  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);
Please sign in to comment.
Something went wrong with that request. Please try again.