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



commit d2d18e4fcc45738014ad37c52aa4fb18da5dc5de
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 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index eb285777..8c6fea4a 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -111,7 +111,12 @@ 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)
+
+        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]