andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 652 forks source link

Twitching progress bar #390

Open airaketa opened 3 years ago

airaketa commented 3 years ago

Hello, I'm trying the library by developing a simple application with a progress bar. The problem is that while updating progress of the progress bar it seems to be twitching - visually, it seems that for a split second, progress becomes less than it was before, so the progress is not updated linearly from the smallest to the largest. In my code, I just update the progress from 0 to 100 in increments of 5 units with a fixed period of time, and the problem still occurs. The problem also reproduces when I just set the same progress value over and over again.

The problem is reproducing on Windows 10 x64 machine.

Perhaps the verbal description of the problem is not very clear, so I'm attaching a gif displaying the described effect progress-twitching

Any ideas on how to get rid of such progress bar behaviour?

andlabs commented 3 years ago

Less and then greater? The progress bar actually sets the progress greater than it is for a split-second and then less, to bypass the forced animation that Windows puts on progress bars and have the progress change show up immediately, but I thought that wouldn't be noticeable because it happens in between draw cycles. Interesting...

airaketa commented 3 years ago

Is it possible maybe to add some optional property to be able to disable this behavior?