[gnome-music/wip/jfelder/async-duration: 25/26] smoothscale: Reset value on duration change
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/async-duration: 25/26] smoothscale: Reset value on duration change
- Date: Fri, 7 May 2021 13:20:44 +0000 (UTC)
commit 7ebb472ad15f88a143055f7e11e162069364106e
Author: Jean Felder <jfelder src gnome org>
Date: Mon Apr 12 20:19:51 2021 +0200
smoothscale: Reset value on duration change
This can prevent a visual glitch when the new song duration is greater
than the previous one: the scale does not immediately go back to the
start.
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]