[gnome-music/wip/mschraal/searchview-rework: 7/15] data/ui: SearchView touchups
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/searchview-rework: 7/15] data/ui: SearchView touchups
- Date: Sat, 3 Aug 2019 10:29:04 +0000 (UTC)
commit 7724837c4b3c58864b63ae544ab348f25977b37d
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Jul 31 19:13:56 2019 +0200
data/ui: SearchView touchups
data/ui/SearchView.ui | 23 +++++++++++++++++++----
gnomemusic/views/searchview.py | 6 +++---
2 files changed, 22 insertions(+), 7 deletions(-)
---
diff --git a/data/ui/SearchView.ui b/data/ui/SearchView.ui
index 1b23e1b8..83b2860c 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -22,7 +22,7 @@
</object>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton" id="_artists_button">
<property name="halign">end</property>
<property name="label" translatable="yes">View All</property>
</object>
@@ -30,7 +30,22 @@
</object>
</child>
<child>
- <object class="GtkListBox" 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>
<object class="GtkBox">
@@ -45,7 +60,7 @@
</object>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton" id="_albums_button">
<property name="halign">end</property>
<property name="label" translatable="yes">View All</property>
</object>
@@ -83,7 +98,7 @@
</object>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton" id="_songs_button">
<property name="halign">end</property>
<property name="label" translatable="yes">View All</property>
</object>
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 820d9bc7..b272903b 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -49,7 +49,7 @@ class SearchView(Gtk.Stack):
_search_results = Gtk.Template.Child()
_album_flowbox = Gtk.Template.Child()
- _artist_listbox = Gtk.Template.Child()
+ _artist_flowbox = Gtk.Template.Child()
_songs_listbox = Gtk.Template.Child()
def __repr__(self):
@@ -88,7 +88,7 @@ class SearchView(Gtk.Stack):
self._album_flowbox.connect(
"child-activated", self._on_album_activated)
- self._artist_listbox.bind_model(
+ self._artist_flowbox.bind_model(
self._artist_filter, self._create_artist_widget)
self.show_all()
@@ -257,7 +257,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]