[gnome-music/wip/jfelder/gtk4-v3: 6/200] smoothscale: Remove stylecontext state use
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/gtk4-v3: 6/200] smoothscale: Remove stylecontext state use
- Date: Fri, 11 Feb 2022 15:44:43 +0000 (UTC)
commit 3b639b3cbfb163ea0f1d4fb59c845b63e63f1a2f
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]