[gnome-music/gbsneto/more-small-improvements: 1/2] artstack: Add .card on medium and large arts




commit 291ca3aab45026f0a35784981db642c4c2d6fe4e
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..9bf059ba6 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 is ArtSize.MEDIUM) or (value is 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]