NSProgressIndicator – for widgets!

During my work on a couple of projects – including the forthcoming major upgrade to the BBC Radio widget – I desired a simple, OS X-like progress indicator, similar to Apple’s NSProgressIndicator. I found that a couple of people have implemented something similar in Dashboard widgets; generally in the form of an animated .gif. That’s fine, so long as your background is white. Mine isn’t.

So I opted to construct my own; I threw together a simple AppleScript Studio program, made a transparent window and took a screenshot of the indicator in each of its positions, then strung these together into a sequence of .png images, animated with the magic of Javascript. Seeing as I’d put a fair amount of effort into it, I decided to clean up my code and release it, just in case someone else would find it useful. As far as I can tell, it’s an exact replication in WebKit of the NSProgressIndicator circular spinner; and it works in the only browsers I’ve tested it in, Safari 2.0, FireFox 1.0.7, and (perhaps surprisingly) IE:Mac.

You can test it out here, or download it here.

[update] – I’ve seen a few downloads of this little tool; obviously, I didn’t expect many… it’s a bit of a niche product, to say the least! If you end up using this in a project, I’d love to hear about it – just drop me an email from the panel on the right. Obviously, any problems and I’ll do my best to fix them :)

PS. No using this in and Microsoft- or Windows-based projects. You should ask before commercial use, too.

0 Responses to “NSProgressIndicator – for widgets!”

Comments are currently closed.