[gnome-music/wip/jfelder/gtk4-v3: 73/108] defaulticon: cairo.imageSurface -> CoverPaintable




commit ec039ca57039401d276d5dfdec833138c33c4cfb
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat Feb 5 16:08:55 2022 +0100

    defaulticon: cairo.imageSurface -> CoverPaintable

 gnomemusic/defaulticon.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/defaulticon.py b/gnomemusic/defaulticon.py
index 8027577ed..c54e5114f 100644
--- a/gnomemusic/defaulticon.py
+++ b/gnomemusic/defaulticon.py
@@ -35,7 +35,7 @@ from gnomemusic.utils import ArtSize, DefaultIconType
 class DefaultIcon(GObject.GObject):
     """Provides the symbolic fallback icons."""
     _cache: Dict[
-        Tuple[DefaultIconType, ArtSize, int, bool], cairo.ImageSurface] = {}
+        Tuple[DefaultIconType, ArtSize, int, bool], CoverPaintable] = {}
 
     def __init__(self, widget: Gtk.Widget) -> None:
         """Initialize DefaultIcon
@@ -48,23 +48,23 @@ class DefaultIcon(GObject.GObject):
 
     def _make_default_icon(
             self, icon_type: DefaultIconType, art_size: ArtSize, scale: int,
-            dark: bool) -> cairo.ImageSurface:
+            dark: bool) -> CoverPaintable:
         paintable = CoverPaintable(art_size, self._widget, icon_type=icon_type)
 
         return paintable
 
     def get(self, icon_type: DefaultIconType,
-            art_size: ArtSize) -> cairo.ImageSurface:
+            art_size: ArtSize) -> CoverPaintable:
         """Returns the requested symbolic icon
 
-        Returns a cairo surface of the requested symbolic icon in the
-        given size and shape.
+        Returns a paintable of the requested symbolic icon in the
+        given size, shape and color.
 
         :param DefaultIconType icon_type: The type of icon
         :param ArtSize art_size: The size requested
 
         :return: The symbolic icon
-        :rtype: cairo.ImageSurface
+        :rtype: CoverPaintable
         """
         dark = Adw.StyleManager.get_default().props.dark
         scale = self._widget.props.scale_factor


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