[gnome-music/wip/mschraal/widget-assorted-fixes: 2/2] disclistboxwidget: Return a GtkListBoxRow in DiscBox
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/widget-assorted-fixes: 2/2] disclistboxwidget: Return a GtkListBoxRow in DiscBox
- Date: Tue, 18 Feb 2020 13:17:59 +0000 (UTC)
commit 1a05f2644973d092303d8cad02a616608e81b26b
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]