[gnome-music/wip/mschraal/rework-art-widget: 25/26] coverpaintable: Flip argument order




commit 97cd35b72750cfa94f13c991691fc96126adb273
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Apr 3 13:00:05 2022 +0200

    coverpaintable: Flip argument order
    
    Feels more natural to pass the widget first.

 gnomemusic/coverpaintable.py   | 6 +++---
 gnomemusic/widgets/artstack.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index d28490edb..5b825dea6 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -52,12 +52,12 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
     __gtype_name__ = "CoverPaintable"
 
     def __init__(
-            self, art_size: ArtSize, widget: Gtk.Widget,
-            icon_type: DefaultIconType = DefaultIconType.ALBUM) -> None:
+            self, widget: Gtk.Widget, art_size: ArtSize,
+            icon_type: DefaultIconType) -> None:
         """Initiliaze CoverPaintable
 
-        :param ArtSize art_size: Size of the cover
         :param Gtk.Widget widget: Widget using the cover
+        :param ArtSize art_size: Size of the cover
         :param DefaultIconType icon_type: Type of cover
         """
         super().__init__()
diff --git a/gnomemusic/widgets/artstack.py b/gnomemusic/widgets/artstack.py
index e1c098a44..b8042612e 100644
--- a/gnomemusic/widgets/artstack.py
+++ b/gnomemusic/widgets/artstack.py
@@ -60,7 +60,7 @@ class ArtStack(Gtk.Stack):
         self._art_type = DefaultIconType.ALBUM
         self._coreobject: Optional[CoreObject] = None
         self._cover_paintable = CoverPaintable(
-            size, self, icon_type=self._art_type)
+            self, size, self._art_type)
         self._size = size
 
         self._cover = Gtk.Image()


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