[gnome-music/wip/mschraal/default-icon-cleanups: 3/17] ui/SearchView: Use Hdy.Clamp for content size




commit f09ab49db57c900f76bf53b46b8a05049fba6472
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Aug 25 11:10:11 2021 +0200

    ui/SearchView: Use Hdy.Clamp for content size
    
    Related: #464

 data/ui/SearchView.ui | 318 +++++++++++++++++++++++++-------------------------
 1 file changed, 161 insertions(+), 157 deletions(-)
---
diff --git a/data/ui/SearchView.ui b/data/ui/SearchView.ui
index ff19fddd9..818a7fd77 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -20,151 +20,153 @@
         <property name="vexpand">True</property>
         <property name="visible">True</property>
         <child>
-          <object class="GtkBox" id="container">
-            <property name="halign">fill</property>
-            <property name="hexpand">True</property>
-            <property name="margin-bottom">20</property>
-            <property name="margin-end">120</property>
-            <property name="margin-start">120</property>
-            <property name="margin-top">20</property>
-            <property name="orientation">vertical</property>
+          <object class="HdyClamp">
+            <property name="maximum-size">1600</property>
             <property name="visible">True</property>
             <child>
-              <object class="GtkBox" id="_artist_header">
+              <object class="GtkBox" id="container">
                 <property name="halign">fill</property>
                 <property name="hexpand">True</property>
-                <property name="homogeneous">True</property>
-                <property name="orientation">horizontal</property>
+                <property name="margin-bottom">20</property>
+                <property name="margin-end">120</property>
+                <property name="margin-start">120</property>
+                <property name="margin-top">20</property>
+                <property name="orientation">vertical</property>
                 <property name="visible">True</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="label" translatable="yes">Artists</property>
+                  <object class="GtkBox" id="_artist_header">
+                    <property name="halign">fill</property>
+                    <property name="hexpand">True</property>
+                    <property name="homogeneous">True</property>
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Artists</property>
+                        <property name="visible">True</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>
+                        <property name="always_show_image">True</property>
+                        <property name="image">view_all_image_artist</property>
+                        <property name="image_position">right</property>
+                        <property name="visible">True</property>
+                        <signal name="button-release-event" handler="_on_all_artists_clicked" swapped="no"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <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-bottom">18</property>
+                    <property name="margin-top">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>
+                    <signal name="child-activated" handler="_on_artist_activated" swapped="no"/>
                     <style>
-                      <class name="search-header"/>
+                      <class name="content-view"/>
                     </style>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkButton" id="_view_all_artists">
-                    <property name="halign">end</property>
-                    <property name="label" translatable="yes">View All</property>
-                    <property name="always_show_image">True</property>
-                    <property name="image">view_all_image_artist</property>
-                    <property name="image_position">right</property>
+                  <object class="GtkBox" id="_album_header">
+                    <property name="halign">fill</property>
+                    <property name="hexpand">True</property>
+                    <property name="homogeneous">True</property>
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
-                    <signal name="button-release-event" handler="_on_all_artists_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Albums</property>
+                        <property name="visible">True</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>
+                        <property name="always_show_image">True</property>
+                        <property name="image">view_all_image_album</property>
+                        <property name="image_position">right</property>
+                        <property name="visible">True</property>
+                        <signal name="button-release-event" handler="_on_all_albums_clicked" swapped="no"/>
+                      </object>
+                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <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-bottom">18</property>
-                <property name="margin-end">0</property>
-                <property name="margin-start">0</property>
-                <property name="margin-top">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>
-                <signal name="child-activated" handler="_on_artist_activated" swapped="no"/>
-                <style>
-                  <class name="content-view"/>
-                </style>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="_album_header">
-                <property name="halign">fill</property>
-                <property name="hexpand">True</property>
-                <property name="homogeneous">True</property>
-                <property name="orientation">horizontal</property>
-                <property name="visible">True</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="label" translatable="yes">Albums</property>
+                  <object class="GtkFlowBox" id="_album_flowbox">
+                    <property name="halign">fill</property>
+                    <property name="hexpand">True</property>
+                    <property name="valign">start</property>
+                    <property name="homogeneous">True</property>
+                    <property name="min_children_per_line">1</property>
+                    <property name="max_children_per_line">6</property>
+                    <property name="margin-bottom">18</property>
+                    <property name="margin-top">18</property>
+                    <property name="row_spacing">12</property>
+                    <property name="column_spacing">6</property>
+                    <property name="selection_mode">none</property>
                     <property name="visible">True</property>
+                    <signal name="child-activated" handler="_on_album_activated" swapped="no"/>
                     <style>
-                      <class name="search-header"/>
+                      <class name="content-view"/>
                     </style>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkButton" id="_view_all_albums">
-                    <property name="halign">end</property>
-                    <property name="label" translatable="yes">View All</property>
-                    <property name="always_show_image">True</property>
-                    <property name="image">view_all_image_album</property>
-                    <property name="image_position">right</property>
+                  <object class="GtkBox" id="_songs_header">
+                    <property name="halign">fill</property>
+                    <property name="hexpand">True</property>
+                    <property name="homogeneous">True</property>
+                    <property name="orientation">horizontal</property>
                     <property name="visible">True</property>
-                    <signal name="button-release-event" handler="_on_all_albums_clicked" swapped="no"/>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Songs</property>
+                        <property name="visible">True</property>
+                        <style>
+                          <class name="search-header"/>
+                        </style>
+                      </object>
+                    </child>
                   </object>
                 </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkFlowBox" id="_album_flowbox">
-                <property name="halign">fill</property>
-                <property name="hexpand">True</property>
-                <property name="valign">start</property>
-                <property name="homogeneous">True</property>
-                <property name="min_children_per_line">1</property>
-                <property name="max_children_per_line">6</property>
-                <property name="margin-bottom">18</property>
-                <property name="margin-end">0</property>
-                <property name="margin-start">0</property>
-                <property name="margin-top">18</property>
-                <property name="row_spacing">12</property>
-                <property name="column_spacing">6</property>
-                <property name="selection_mode">none</property>
-                <property name="visible">True</property>
-                <signal name="child-activated" handler="_on_album_activated" swapped="no"/>
-                <style>
-                  <class name="content-view"/>
-                </style>
-              </object>
-            </child>
-            <child>
-              <object class="GtkBox" id="_songs_header">
-                <property name="halign">fill</property>
-                <property name="hexpand">True</property>
-                <property name="homogeneous">True</property>
-                <property name="orientation">horizontal</property>
-                <property name="visible">True</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="label" translatable="yes">Songs</property>
+                  <object class="GtkListBox" id="_songs_listbox">
+                    <property name="margin-top">20</property>
                     <property name="visible">True</property>
+                    <signal name="row-activated" handler="_song_activated" swapped="no"/>
                     <style>
-                      <class name="search-header"/>
+                      <class name="content"/>
                     </style>
                   </object>
                 </child>
               </object>
             </child>
-            <child>
-              <object class="GtkListBox" id="_songs_listbox">
-                <property name="margin-top">20</property>
-                <property name="visible">True</property>
-                <signal name="row-activated" handler="_song_activated" swapped="no"/>
-                <style>
-                  <class name="content"/>
-                </style>
-              </object>
-            </child>
           </object>
         </child>
       </object>
@@ -175,56 +177,58 @@
         <property name="vexpand">True</property>
         <property name="visible">True</property>
         <child>
-          <object class="GtkBox">
-            <property name="halign">fill</property>
-            <property name="hexpand">True</property>
-            <property name="margin-bottom">20</property>
-            <property name="margin-end">120</property>
-            <property name="margin-start">120</property>
-            <property name="margin-top">20</property>
-            <property name="orientation">vertical</property>
+          <object class="HdyClamp">
+            <property name="maximum-size">1600</property>
             <property name="visible">True</property>
             <child>
-              <object class="GtkFlowBox" id="_artist_all_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-bottom">18</property>
-                <property name="margin-end">18</property>
-                <property name="margin-start">18</property>
-                <property name="margin-top">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>
-                <signal name="child-activated" handler="_on_artist_activated" swapped="no"/>
-                <style>
-                  <class name="content-view"/>
-                </style>
-              </object>
-            </child>
-            <child>
-              <object class="GtkFlowBox" id="_album_all_flowbox">
+              <object class="GtkBox">
                 <property name="halign">fill</property>
                 <property name="hexpand">True</property>
-                <property name="valign">start</property>
-                <property name="homogeneous">True</property>
-                <property name="min_children_per_line">1</property>
-                <property name="max_children_per_line">6</property>
-                <property name="margin-bottom">18</property>
-                <property name="margin-end">18</property>
-                <property name="margin-start">18</property>
-                <property name="margin-top">18</property>
-                <property name="row_spacing">12</property>
-                <property name="column_spacing">6</property>
-                <property name="selection_mode">none</property>
+                <property name="margin-bottom">20</property>
+                <property name="margin-end">120</property>
+                <property name="margin-start">120</property>
+                <property name="margin-top">20</property>
+                <property name="orientation">vertical</property>
                 <property name="visible">True</property>
-                <signal name="child-activated" handler="_on_album_activated" swapped="no"/>
-                <style>
-                  <class name="content-view"/>
-                </style>
+                <child>
+                  <object class="GtkFlowBox" id="_artist_all_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-bottom">18</property>
+                    <property name="margin-top">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>
+                    <signal name="child-activated" handler="_on_artist_activated" swapped="no"/>
+                    <style>
+                      <class name="content-view"/>
+                    </style>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkFlowBox" id="_album_all_flowbox">
+                    <property name="halign">fill</property>
+                    <property name="hexpand">True</property>
+                    <property name="valign">start</property>
+                    <property name="homogeneous">True</property>
+                    <property name="min_children_per_line">1</property>
+                    <property name="max_children_per_line">6</property>
+                    <property name="margin-bottom">18</property>
+                    <property name="margin-top">18</property>
+                    <property name="row_spacing">12</property>
+                    <property name="column_spacing">6</property>
+                    <property name="selection_mode">none</property>
+                    <property name="visible">True</property>
+                    <signal name="child-activated" handler="_on_album_activated" swapped="no"/>
+                    <style>
+                      <class name="content-view"/>
+                    </style>
+                  </object>
+                </child>
               </object>
             </child>
           </object>


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