[gnome-music/wip/jfelder/gtk4-v3: 169/175] coverpaintable: Add docstrings and copyright




commit f5fe68681fe8e16dbed3350354d6430e217e1f28
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat Feb 5 20:15:01 2022 +0100

    coverpaintable: Add docstrings and copyright

 gnomemusic/coverpaintable.py | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index 3ffdbdce1..ccee2b2c0 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -1,3 +1,27 @@
+# Copyright 2022 The GNOME Music developers
+#
+# GNOME Music is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GNOME Music is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with GNOME Music; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# The GNOME Music authors hereby grant permission for non-GPL compatible
+# GStreamer plugins to be used and distributed together with GStreamer
+# and GNOME Music.  This permission is above and beyond the permissions
+# granted by the GPL license by which GNOME Music is covered.  If you
+# modify this code, you may extend this exception to your version of the
+# code, but you are not obligated to do so.  If you do not wish to do so,
+# delete this exception statement from your version.
+
 import gi
 gi.require_versions({"Gdk": "4.0", "Gtk": "4.0", "Gsk": "4.0"})
 from gi.repository import Gsk, Gtk, GObject, Graphene, Gdk
@@ -6,12 +30,26 @@ from gnomemusic.utils import ArtSize, DefaultIconType
 
 
 class CoverPaintable(GObject.GObject, Gdk.Paintable):
+    """An album/artist cover or placeholder
+
+    Provides the full looks. Rounded corners for albums and round for
+    artists.
+    """
 
     __gtype_name__ = "CoverPaintable"
 
     def __init__(
             self, art_size, widget, icon_type=DefaultIconType.ALBUM,
             texture=None, dark=False):
+        """Initiliaze CoverPaintable
+
+        :param ArtSize art_size: Size of the cover
+        :param Gtk.Widget widget: Widget using the cover
+        :param DefaultIconType icon_type: Type of cover
+        :param Gdk.Texture texture: Texture to use or None for
+            placeholder
+        :param bool dark: Dark mode
+        """
         super().__init__()
 
         self._art_size = art_size


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