[gnome-music/wip/mschraal/gtk4] coverpaintable: Workaround IconTheme changes
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4] coverpaintable: Workaround IconTheme changes
- Date: Tue, 28 Apr 2020 23:59:11 +0000 (UTC)
commit 1589e7e218b01078a982fa9a2c92d9065e63116e
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Apr 29 01:19:08 2020 +0200
coverpaintable: Workaround IconTheme changes
gnomemusic/coverpaintable.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index e66e4ecf..ad096540 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -29,9 +29,12 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
theme = Gtk.IconTheme.new()
- pixbuf = theme.load_icon("content-loading-symbolic", w, 0)
+ # pixbuf = theme.load_icon("content-loading-symbolic", w, 0)
+ icon_pt = theme.lookup_icon(
+ "content-loading-symbolic", None, w, 1, 0, 0)
+ texture = Gdk.Texture.new_from_file(icon_pt.get_file())
rect = Graphene.Rect().init(0, 0, width, height)
- snapshot.append_texture(pixbuf, rect)
+ snapshot.append_texture(texture, rect)
size = min(width, height)
@@ -60,10 +63,13 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
color.alpha = 1.0
rect = Graphene.Rect().init(0, 0, width, height)
- pixbuf = theme.load_icon("content-loading-symbolic", w, 0)
+ # pixbuf = theme.load_icon("content-loading-symbolic", w,# 0)
+ icon_pt = theme.lookup_icon(
+ "content-loading-symbolic", None, w, 1, 0, 0)
+ texture = Gdk.Texture.new_from_file(icon_pt.get_file())
rect = Graphene.Rect().init(
0 + border, 0 + border, width - border, height - border)
- snapshot.append_texture(pixbuf, rect)
+ snapshot.append_texture(texture, rect)
# snapshot.append_color(color, rect)
# size = min(width, height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]