mrackwitz / MRProgress

Collection of iOS drop-in components to visualize progress
MIT License
2.55k stars 306 forks source link

Inset progress line by half its width #63

Closed frankus closed 9 years ago

frankus commented 9 years ago

I found that setting a thicker lineWidth caused the progress circle to end up partially outside the border. This doesn't look great IMO, and isn't consistent with e.g. the download progress in the Music app.

This change allows a thicker lineWidth value to be used with any borderWidth value. As the line width grows, the radius shrinks so that it never ends up partially outside the border.

It preserves the half-pixel overlap of the original so that a little gap doesn't appear between the border and the progress circle.

mrackwitz commented 9 years ago

Thanks for filing this very detailed issue and the PR! :+1: