[gnome-music/wip/mschraal/rework-art-widget: 24/26] coverpaintable: Adapt Gdk.RGBA calls
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/rework-art-widget: 24/26] coverpaintable: Adapt Gdk.RGBA calls
- Date: Thu, 7 Apr 2022 22:46:09 +0000 (UTC)
commit f8011a7f23119437e2ae9f652a6942404ad67b36
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Apr 3 12:26:52 2022 +0200
coverpaintable: Adapt Gdk.RGBA calls
The previous calls were GTK3 style and do not currently work in GTK4.
gnomemusic/coverpaintable.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/coverpaintable.py b/gnomemusic/coverpaintable.py
index f3308473b..d28490edb 100644
--- a/gnomemusic/coverpaintable.py
+++ b/gnomemusic/coverpaintable.py
@@ -108,9 +108,10 @@ class CoverPaintable(GObject.GObject, Gdk.Paintable):
self._icon_type.value, None, w * i_s,
self._widget.props.scale_factor, 0, 0)
- bg_color = Gdk.RGBA(1, 1, 1, 1)
+ bg_color = Gdk.RGBA()
+ bg_color.parse("rgba(95%, 95%, 95%, 1)")
if self._style_manager.props.dark:
- bg_color = Gdk.RGBA(0.3, 0.3, 0.3, 1)
+ bg_color.parse("rgba(30%, 30%, 30%, 1)")
snapshot.append_color(bg_color, Graphene.Rect().init(0, 0, w, h))
snapshot.translate(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]