update slider once per second always

This commit is contained in:
Drew Weymouth
2022-12-23 14:55:47 -08:00
parent af24ec56a8
commit 024557d49e
4 changed files with 13 additions and 25 deletions
+2 -3
View File
@@ -148,9 +148,8 @@ func (pc *PlayerControls) doPlayTimeUpdate(curTime, totalTime float64) {
pc.curTimeLabel.SetText(ct)
updated = true
}
if totalTime < 210 || updated {
// if current track is long, we only need to redraw the slider
// when the time label updates, to reduce screen redraws.
if updated {
// Only update slider once a second when time label changes
pc.slider.SetValue(v)
}
}