manumaticx / circularprogress

Circular Progressbar Widget for Alloy
87 stars 19 forks source link

Change the progressColor/progressBackgroundColor via script #23

Closed m1ga closed 8 years ago

m1ga commented 8 years ago

adding export.setProgressColor()/export.setProgressBackgroundColor() to change the color via javascript

manumaticx commented 8 years ago

Hi Michael.

Thanks for the pull request! 👍

Those properties are already exposed, actually. I haven't tested but I think changing the colors won't take effect as they're applied in the createViewmethod. So, the calling this after applying the property here would be much more simpler. Does that make sense?

I'll check this later today. If this won't work I'll merge this.

m1ga commented 8 years ago

Ok, didn't see those :) But I think it isn't useful in my use case: I've used Alloy to add the widget so its already created and then it won't change the colors when I set the properties. With this PR I can change it and even change it after some time (e.g. <50% it goes red).