[gnome-music/gbsneto/more-small-improvements: 6/7] artstack: Add .card on medium and large arts
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gbsneto/more-small-improvements: 6/7] artstack: Add .card on medium and large arts
- Date: Wed, 23 Feb 2022 20:01:21 +0000 (UTC)
commit 58c5f429bb83515c5a57b59462fe31beee8cfdd8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 17 21:13:39 2022 -0300
artstack: Add .card on medium and large arts
This adds the now prevalent shadows when the art is large
enough, and it looks gorgeous.
gnomemusic/widgets/artstack.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gnomemusic/widgets/artstack.py b/gnomemusic/widgets/artstack.py
index 8daa12c48..2669aad5e 100644
--- a/gnomemusic/widgets/artstack.py
+++ b/gnomemusic/widgets/artstack.py
@@ -98,6 +98,12 @@ class ArtStack(Gtk.Stack):
:param ArtSize value: The size to use for the cover
"""
self.set_size_request(value.width, value.height)
+
+ if value in [ArtSize.MEDIUM, ArtSize.LARGE]:
+ self.add_css_class('card')
+ else:
+ self.remove_css_class('card')
+
self._size = value
@GObject.Property(type=object, flags=GObject.ParamFlags.READWRITE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]