[gnome-music/wip/mschraal/rework-art-widget: 16/18] coverpaintable: Adapt Gdk.RGBA calls




commit 486d0436303b72cccd817f1007b4ce03db56098f
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Apr 3 12:26:52 2022 +0200

    coverpaintable: Adapt Gdk.RGBA calls
    
    The previous calls were GTK3 style and do not currently work in GTK4.

 gnomemusic/coverpaintable.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index c7dd04a93..c202367bd 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -108,9 +108,10 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
                 self._icon_type.value, None, w * i_s,
                 self._widget.props.scale_factor, 0, 0)
 
-            bg_color = Gdk.RGBA(1, 1, 1, 1)
+            bg_color = Gdk.RGBA()
+            bg_color.parse("rgba(95%, 95%, 95%, 1)")
             if self._style_manager.props.dark:
-                bg_color = Gdk.RGBA(0.3, 0.3, 0.3, 1)
+                bg_color.parse("rgba(30%, 30%, 30%, 1)")
 
             snapshot.append_color(bg_color, Graphene.Rect().init(0, 0, w, h))
             snapshot.translate(


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