[gnome-music/gbsneto/shrink-empty-view: 1/2] emptyview: Move initial state into an AdwClamp




commit 1a5ea8c67dafe025ed2524bebe329b6a12bbee63
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat May 7 13:58:19 2022 -0300

    emptyview: Move initial state into an AdwClamp
    
    This makes it consistent with other GNOME apps, by limiting the
    width of the page. The maximum-size value is somewhat arbitrary,
    it's exactly the value needed to match the mockup.

 data/ui/EmptyView.ui | 56 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 31 insertions(+), 25 deletions(-)
---
diff --git a/data/ui/EmptyView.ui b/data/ui/EmptyView.ui
index 2be102a91..9a6aa5645 100644
--- a/data/ui/EmptyView.ui
+++ b/data/ui/EmptyView.ui
@@ -10,32 +10,38 @@
       </object>
     </child>
   </template>
-  <object class="GtkBox" id="_initial_state">
-    <property name="valign">start</property>
-    <property name="orientation">vertical</property>
+  <object class="AdwClamp" id="_initial_state">
+    <property name="maximum-size">620</property>
+    <property name="tightening-threshold">500</property>
     <child>
-      <object class="GtkPicture">
-        <property name="can-shrink">true</property>
-        <property name="keep-aspect-ratio">true</property>
-        <property name="file">resource:///org/gnome/Music/icons/welcome-music.svg</property>
-      </object>
-    </child>
-    <child>
-      <object class="GtkLabel" id="_title_label">
-        <property name="justify">center</property>
-        <property name="label" translatable="yes">Welcome to Music</property>
-        <style>
-          <class name="large-title"/>
-        </style>
-      </object>
-    </child>
-    <child>
-      <object class="GtkLabel" id="_description_label">
-        <property name="justify">center</property>
-        <property name="use-markup">True</property>
-        <style>
-          <class name="body"/>
-        </style>
+      <object class="GtkBox">
+        <property name="valign">start</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkPicture">
+            <property name="can-shrink">true</property>
+            <property name="keep-aspect-ratio">true</property>
+            <property name="file">resource:///org/gnome/Music/icons/welcome-music.svg</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel" id="_title_label">
+            <property name="justify">center</property>
+            <property name="label" translatable="yes">Welcome to Music</property>
+            <style>
+              <class name="large-title"/>
+            </style>
+          </object>
+        </child>
+        <child>
+          <object class="GtkLabel" id="_description_label">
+            <property name="justify">center</property>
+            <property name="use-markup">True</property>
+            <style>
+              <class name="body"/>
+            </style>
+          </object>
+        </child>
       </object>
     </child>
   </object>


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