[gnome-music/gbsneto/minor-fixes: 2/2] discbox: Return a GtkListBoxRow
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gbsneto/minor-fixes: 2/2] discbox: Return a GtkListBoxRow
- Date: Wed, 17 Jul 2019 15:54:24 +0000 (UTC)
commit f1f86725171710d58805367edbd830afb354b997
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jul 17 12:51:50 2019 -0300
discbox: Return a GtkListBoxRow
By returning a non-activatable, non-selectable row
we avoid the shadow in the first song of the disc.
gnomemusic/widgets/disclistboxwidget.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index 10c5bf3c..bbd28409 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -138,8 +138,15 @@ class DiscBox(Gtk.Box):
| GObject.BindingFlags.SYNC_CREATE)
song_widget.connect('button-release-event', self._song_activated)
+ song_widget.show()
- return song_widget
+ row = Gtk.ListBoxRow()
+ row.props.activatable = False
+ row.props.selectable = False
+ row.add(song_widget)
+ row.show()
+
+ return row
@log
def _on_selection_changed(self, widget):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]