[gnome-music/wip/jfelder/sidebar-icons: 12/12] artisttile: Add an artist art
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/sidebar-icons: 12/12] artisttile: Add an artist art
- Date: Sat, 14 Aug 2021 13:27:09 +0000 (UTC)
commit 4f907326840a7f8f5ea5c58b13649d3f7aded9e1
Author: Jean Felder <jfelder src gnome org>
Date: Thu Jan 28 21:32:42 2021 +0100
artisttile: Add an artist art
data/ui/ArtistTile.ui | 31 ++++++++++++++++++++++---------
gnomemusic/widgets/artisttile.py | 5 +++++
2 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/data/ui/ArtistTile.ui b/data/ui/ArtistTile.ui
index b5b0586a1..c7af54deb 100644
--- a/data/ui/ArtistTile.ui
+++ b/data/ui/ArtistTile.ui
@@ -4,16 +4,29 @@
<property name="can_focus">False</property>
<property name="visible">True</property>
<child>
- <object class="GtkLabel" id="_label">
- <property name="can_focus">False</property>
- <property name="ellipsize">end</property>
- <property name="halign">start</property>
- <property name="hexpand">False</property>
- <property name="margin-bottom">16</property>
- <property name="margin-end">16</property>
- <property name="margin-start">16</property>
- <property name="margin-top">16</property>
+ <object class="GtkBox">
+ <property name="orientation">horizontal</property>
<property name="visible">True</property>
+ <property name="margin-start">10</property>
+ <child>
+ <object class="ArtStack" id="_art_stack">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="_label">
+ <property name="can_focus">False</property>
+ <property name="ellipsize">end</property>
+ <property name="halign">start</property>
+ <property name="hexpand">False</property>
+ <property name="margin-bottom">16</property>
+ <property name="margin-end">10</property>
+ <property name="margin-start">10</property>
+ <property name="margin-top">16</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
</object>
</child>
</template>
diff --git a/gnomemusic/widgets/artisttile.py b/gnomemusic/widgets/artisttile.py
index 9be6f0fb8..eb1a152b1 100644
--- a/gnomemusic/widgets/artisttile.py
+++ b/gnomemusic/widgets/artisttile.py
@@ -25,6 +25,7 @@
from gi.repository import GObject, Gtk
from gnomemusic.coreartist import CoreArtist
+from gnomemusic.utils import ArtSize
@Gtk.Template(resource_path='/org/gnome/Music/ui/ArtistTile.ui')
@@ -36,6 +37,7 @@ class ArtistTile(Gtk.ListBoxRow):
__gtype_name__ = 'ArtistTile'
+ _art_stack = Gtk.Template.Child()
_label = Gtk.Template.Child()
coreartist = GObject.Property(type=CoreArtist, default=None)
@@ -46,6 +48,9 @@ class ArtistTile(Gtk.ListBoxRow):
self.props.coreartist = coreartist
+ self._art_stack.props.size = ArtSize.XSMALL
+ self._art_stack.props.coreobject = self.props.coreartist
+
self.bind_property('text', self._label, 'label')
self.bind_property('text', self._label, 'tooltip-text')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]