[nautilus/wip/cdavis/use-status-page: 3/4] gtkplacesview: Use AdwStatusPage




commit 83aa6ce3ffbdabb5f2d79354616d8cfac72d2ecd
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Jul 16 15:59:32 2022 -0400

    gtkplacesview: Use AdwStatusPage
    
    The places view had placeholders in a popover and for search. These
    are both use cases where we can and should use AdwStatusPage.

 src/gtk/nautilusgtkplacesview.ui | 65 +++++++---------------------------------
 1 file changed, 10 insertions(+), 55 deletions(-)
---
diff --git a/src/gtk/nautilusgtkplacesview.ui b/src/gtk/nautilusgtkplacesview.ui
index a157ea1bb..1e7048d3e 100644
--- a/src/gtk/nautilusgtkplacesview.ui
+++ b/src/gtk/nautilusgtkplacesview.ui
@@ -99,28 +99,12 @@
           <object class="GtkStackPage">
             <property name="name">empty</property>
             <property name="child">
-              <object class="GtkBox">
-                <property name="vexpand">1</property>
-                <property name="valign">3</property>
-                <property name="orientation">1</property>
-                <property name="spacing">18</property>
-                <child>
-                  <object class="GtkImage">
-                    <property name="pixel-size">48</property>
-                    <property name="icon-name">network-server-symbolic</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes" comments="Translators: Server as any 
successfully connected network address">No recent servers found</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
+              <object class="AdwStatusPage">
+                <property name="icon-name">network-server-symbolic</property>
+                <property name="title" translatable="yes" comments="Translators: Server as any successfully 
connected network address">No recent servers found</property>
+                <style>
+                  <class name="compact"/>
+                </style>
               </object>
             </property>
           </object>
@@ -200,39 +184,10 @@
           <object class="GtkStackPage">
             <property name="name">empty-search</property>
             <property name="child">
-              <object class="GtkBox">
-                <property name="halign">3</property>
-                <property name="valign">3</property>
-                <property name="hexpand">1</property>
-                <property name="vexpand">1</property>
-                <property name="orientation">1</property>
-                <property name="spacing">12</property>
-                <child>
-                  <object class="GtkImage">
-                    <property name="pixel-size">72</property>
-                    <property name="icon-name">edit-find-symbolic</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">No results found</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"></attribute>
-                      <attribute name="scale" value="1.44"></attribute>
-                    </attributes>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">Try a different search</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
+              <object class="AdwStatusPage">
+                <property name="icon-name">edit-find-symbolic</property>
+                <property name="title" translatable="yes">No results found</property>
+                <property name="label" translatable="yes">Try a different search</property>
               </object>
             </property>
           </object>


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