[gnome-music/wip/jfelder/searchview-new-style: 2/15] data/ui: Port artists search results to a flowbox



commit 73f135ace8cc2a91c3ecd7083126b3e45dae7981
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 e5a1129b..24ee372c 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -61,8 +61,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]