[gnome-music/wip/jfelder/new-artist-design: 2/6] albumwidget: Add a show_artist_label property
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/new-artist-design: 2/6] albumwidget: Add a show_artist_label property
- Date: Fri, 30 Jul 2021 17:48:50 +0000 (UTC)
commit 066fb6b1f950ba9c62044da273ae1058ffec47e9
Author: Jean Felder <jfelder src gnome org>
Date: Fri Jul 30 18:04:24 2021 +0200
albumwidget: Add a show_artist_label property
It makes it possible to hide the artist label.
This will be used by ArtistAlbumsWidget in a future commit.
gnomemusic/widgets/albumwidget.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 0d3ac7a60..811915070 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -60,6 +60,7 @@ class AlbumWidget(Gtk.Box):
_title_label = Gtk.Template.Child()
selection_mode = GObject.Property(type=bool, default=False)
+ show_artist_label = GObject.Property(type=bool, default=True)
def __init__(self, application: Application) -> None:
"""Initialize the AlbumWidget.
@@ -81,6 +82,10 @@ class AlbumWidget(Gtk.Box):
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
+ self.bind_property(
+ "show-artist-label", self._artist_label, "visible",
+ GObject.BindingFlags.SYNC_CREATE)
+
self.connect("notify::selection-mode", self._on_selection_mode_changed)
action_group = Gio.SimpleActionGroup()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]