[gnome-music/wip/jfelder/async-duration: 2/3] smoothscale: Reset value on duration change




commit fa64bf00c7706f5217c6f5be9993ea4eb66e4d22
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Apr 12 20:19:51 2021 +0200

    smoothscale: Reset value on duration change

 gnomemusic/widgets/smoothscale.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index d1f6d3f9d..775f08702 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -103,6 +103,7 @@ class SmoothScale(Gtk.Scale):
         duration = self._player.props.duration
 
         if duration != -1.:
+            self.set_value(0)
             self.set_range(0.0, duration * 60)
             self.set_increments(300, 600)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]