[gnome-music/wip/jfelder/searchview-new-style: 2/7] searchview: Add section headers



commit 610a07360a50cea68a50eb5550aaaa17ef85df88
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat Aug 3 13:43:47 2019 +0200

    searchview: Add section headers
    
    Label headers and "View All" buttons are added.

 data/org.gnome.Music.css |  5 ++++
 data/ui/SearchView.ui    | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)
---
diff --git a/data/org.gnome.Music.css b/data/org.gnome.Music.css
index dd4e166e..72bc50aa 100644
--- a/data/org.gnome.Music.css
+++ b/data/org.gnome.Music.css
@@ -155,3 +155,8 @@ padding: 0px;
 .playlistdialog-row:selected label {
     color: @theme_text_color;
 }
+
+/* SearchView */
+.search-header {
+  font-weight: bold;
+}
diff --git a/data/ui/SearchView.ui b/data/ui/SearchView.ui
index 1b99b4b5..863576fe 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -17,11 +17,59 @@
             <property name="margin-top">20</property>
             <property name="orientation">vertical</property>
             <property name="visible">True</property>
+            <child>
+              <object class="GtkBox">
+                <property name="halign">fill</property>
+                <property name="hexpand">True</property>
+                <property name="homogeneous">True</property>
+                <property name="orientation">horizontal</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Artists</property>
+                    <style>
+                      <class name="search-header"/>
+                    </style>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="_view_all_artists">
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">View All</property>
+                  </object>
+                </child>
+              </object>
+            </child>
             <child>
               <object class="GtkFlowBox" id="_artist_listbox">
                 <property name="visible">True</property>
               </object>
             </child>
+            <child>
+              <object class="GtkBox">
+                <property name="halign">fill</property>
+                <property name="hexpand">True</property>
+                <property name="homogeneous">True</property>
+                <property name="orientation">horizontal</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Albums</property>
+                    <style>
+                      <class name="search-header"/>
+                    </style>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="_view_all_albums">
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">View All</property>
+                  </object>
+                </child>
+              </object>
+            </child>
             <child>
               <object class="GtkFlowBox" id="_album_flowbox">
                 <property name="halign">fill</property>
@@ -41,8 +89,33 @@
                 </style>
               </object>
             </child>
+            <child>
+              <object class="GtkBox">
+                <property name="halign">fill</property>
+                <property name="hexpand">True</property>
+                <property name="homogeneous">True</property>
+                <property name="orientation">horizontal</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Songs</property>
+                    <style>
+                      <class name="search-header"/>
+                    </style>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton" id="_view_all_songs">
+                    <property name="halign">end</property>
+                    <property name="label" translatable="yes">View All</property>
+                  </object>
+                </child>
+              </object>
+            </child>
             <child>
               <object class="GtkListBox" id="_songs_listbox">
+                <property name="margin-top">20</property>
                 <property name="visible">True</property>
                 <style>
                   <class name="songs-list"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]