[gnome-music/wip/jfelder/gtk4-v3: 130/175] coverpaintable: Cleanup albumart handling




commit ce14e08022dd91f7723c790367fe237b41aad0d2
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Feb 3 18:19:08 2022 +0100

    coverpaintable: Cleanup albumart handling

 gnomemusic/coverpaintable.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index b884d0f5b..cf8179648 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -19,20 +19,15 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
         h = height
 
         if self._texture is not None:
-            snapshot.translate(Graphene.Point().init(width / 2, height / 2))
-
-            rect = Graphene.Rect().init(-(w / 2), -(h / 2), w, h)
-            rect2 = Graphene.Rect().init(-50, -50, 100, 100)
-
             # Anything Gsk related seems to be failing, no rounded
             # clips for now. Related: pygobject#471
             #
             # gskrr = Gsk.RoundedRect().init_from_rect(rect2, 10)
             # snapshot.push_rounded_clip(gskrr)
-
-            snapshot.push_clip(rect2)
+            snapshot.translate(Graphene.Point().init(width / 2, height / 2))
+            rect = Graphene.Rect().init(-(w / 2), -(h / 2), w, h)
             snapshot.append_texture(self._texture, rect)
-            snapshot.pop()
+            # snapshot.pop()
         else:
             snapshot.append_color(
                 Gdk.RGBA(1, 1, 1, 1), Graphene.Rect().init(0, 0, w, h))


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