[gnome-music/wip/mschraal/gtk4: 18/84] smoothscale: StyleContext getter does not need state
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 18/84] smoothscale: StyleContext getter does not need state
- Date: Tue, 9 Jun 2020 14:22:17 +0000 (UTC)
commit 84ab61b85d66b8f863748ec8b55ab3c75f0a0ce0
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Oct 31 16:37:09 2019 +0100
smoothscale: StyleContext getter does not need state
gnomemusic/widgets/smoothscale.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 31bd85cd..e6eb3578 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -162,10 +162,10 @@ class SmoothScale(Gtk.Scale):
duration = abs(self._player.props.duration)
style_context = self.get_style_context()
- state = style_context.get_state()
+ # 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]