[gnome-music/wip/jfelder/gtk4-v3: 163/208] coverpaintable: Load IconTheme classwide
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/gtk4-v3: 163/208] coverpaintable: Load IconTheme classwide
- Date: Fri, 11 Feb 2022 11:40:23 +0000 (UTC)
commit c56a8b3fac79f16a8b5677beaa52aaa0859b6435
Author: Marinus Schraal <mschraal gnome org>
Date: Fri Feb 4 14:15:13 2022 +0100
coverpaintable: Load IconTheme classwide
gnomemusic/coverpaintable.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index f006654cb..41729b4a9 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -7,6 +7,8 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
__gtype_name__ = "CoverPaintable"
+ _icon_theme = Gtk.IconTheme.new()
+
def __init__(self, art_size, texture=None):
super().__init__()
@@ -25,8 +27,7 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
snapshot.append_texture(self._texture, rect)
else:
i_s = 1 / 3 # Icon scale
- theme = Gtk.IconTheme.new()
- icon_pt = theme.lookup_icon(
+ icon_pt = self._icon_theme.lookup_icon(
"folder-music-symbolic", None, w * i_s, 1, 0, 0)
snapshot.append_color(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]