[gnome-music/wip/mschraal/gtk4-v2: 7/53] smoothscale: Remove stylecontext state use




commit 518d967503896f3e1e6f4a3d67527718aca6c57b
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Apr 11 14:18:11 2021 +0200

    smoothscale: Remove stylecontext state use

 gnomemusic/widgets/smoothscale.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 51e977174..8892c4c4f 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -162,10 +162,8 @@ class SmoothScale(Gtk.Scale):
         duration = abs(self._player.props.duration)
 
         style_context = self.get_style_context()
-        state = style_context.get_state()
-
         width = self.get_allocated_width()
-        padding = style_context.get_padding(state)
+        padding = style_context.get_padding()
         width = max(width - (padding.left + padding.right), 1)
 
         timeout_period = min(1000 * duration // width, 200)


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