Closed Sciss closed 8 years ago
A good note, I will add a few options to progress bar to disable/control animation.
I will also disable the animation as soon as progress bar is at 100% - animating it after is indeed just a waste of processing time. That doesn't apply to indeterminate progress bar though - it will still be animated until removed or changed to non-indeterminate.
Thanks. A question about indeterminate bars - I use them sometimes in terms of visible/hidden. Does WebLaF stop the animation when a bar becomes invisible, or do I actually have to remove it from its parent?
WebLaF animation timer doesn't actually stop, but it causes no effect when component is not visible - repaint calls are simply ignored so even if there would be like 1000 repaint calls per second it will have zero impact on performance. It does waste some micro processing time but it is too small if compare to Swing drawing operations.
But anyway, I will fix this case as well, timer will pause if animation is not needed and will resume when it should be running. Thanks for pointing out this case :)
These changes will be delayed till v1.29 update due to a large amount of changes already available in v1.28, but I will include them into v1.29 for sure.
I'll be closing this now as new progress bar implementation will have all settings configurable through the styles including any existing animations.
I can't seem to find a way to disable the animation for progress bars. While I don't mind having the animation during actual processing, I have an application where the progress bar remains visible after finishing at 100%. I think the animation should always stop when the bar reaches 100% (this is for example what the Apple LaF does), but also that there should be a way to customise the UI to not use animation at all.
I guess it should be a switch on
WebProgressBarStyle
. I can turn off visible animation viaYet that would keep the LaF using CPU power for running an invisible animation, right?
I also tried
StyleConstants.animate = false
but it doesn't seem to have any effect here.