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



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

    disclistboxwidget: Return a GtkListBoxRow in DiscBox
    
    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]