[gnome-music/wip/mschraal/widget-assorted-fixes: 3/3] disclistboxwidget: Return a GtkListBoxRow



commit 62c4627c831b66293872ee701f5c5ea24e34f871
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jul 17 12:51:50 2019 -0300

    disclistboxwidget: Return a GtkListBoxRow
    
    By returning a non-activatable, non-selectable row in DiscBox avoid the
    shadow in the first song of the disc.

 gnomemusic/widgets/disclistboxwidget.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index eb285777..18b8b8ad 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -111,7 +111,13 @@ class DiscBox(Gtk.ListBoxRow):
 
         song_widget.connect('button-release-event', self._song_activated)
 
-        return song_widget
+        row = Gtk.ListBoxRow()
+        row.props.activatable = False
+        row.props.selectable = False
+        row.add(song_widget)
+        row.show()
+
+        return row
 
     def _song_activated(self, widget, event):
         if widget.props.select_click:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]