[gnome-music/wip/jfelder/searchview-new-style: 10/21] data/ui: Port artists search results to a flowbox
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/searchview-new-style: 10/21] data/ui: Port artists search results to a flowbox
- Date: Mon, 5 Aug 2019 00:18:37 +0000 (UTC)
commit 8481c8dbfad0ed81b0647d4b6de41feb6825caa2
Author: Jean Felder <jfelder src gnome org>
Date: Sat Aug 3 17:20:41 2019 +0200
data/ui: Port artists search results to a flowbox
data/ui/SearchView.ui | 15 ++++++++++++++-
gnomemusic/views/searchview.py | 6 +++---
2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/SearchView.ui b/data/ui/SearchView.ui
index 7ad028cf..0329bdf8 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -46,8 +46,21 @@
</object>
</child>
<child>
- <object class="GtkFlowBox" id="_artist_listbox">
+ <object class="GtkFlowBox" id="_artist_flowbox">
+ <property name="column_spacing">6</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">True</property>
+ <property name="homogeneous">True</property>
+ <property name="margin">18</property>
+ <property name="max-children-per-line">6</property>
+ <property name="min-children-per-line">1</property>
+ <property name="row_spacing">12</property>
+ <property name="selection-mode">none</property>
+ <property name="valign">start</property>
<property name="visible">True</property>
+ <style>
+ <class name="content-view"/>
+ </style>
</object>
</child>
<child>
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 73f645c8..defe92ea 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -50,7 +50,7 @@ class SearchView(Gtk.Stack):
selection_mode = GObject.Property(type=bool, default=False)
_album_flowbox = Gtk.Template.Child()
- _artist_listbox = Gtk.Template.Child()
+ _artist_flowbox = Gtk.Template.Child()
_search_results = Gtk.Template.Child()
_songs_listbox = Gtk.Template.Child()
@@ -87,7 +87,7 @@ class SearchView(Gtk.Stack):
self._album_flowbox.bind_model(
self._album_filter, self._create_album_widget)
- self._artist_listbox.bind_model(
+ self._artist_flowbox.bind_model(
self._artist_filter, self._create_artist_widget)
self._player = self._application.props.player
@@ -255,7 +255,7 @@ class SearchView(Gtk.Stack):
self._songs_listbox.foreach(song_select)
self._album_flowbox.foreach(album_select)
- self._artist_listbox.foreach(artist_select)
+ self._artist_flowbox.foreach(artist_select)
def select_all(self):
self._select_all(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]