[calls/wip/cdavis/statuspage-styling: 4/5] history-box: Use HdyStatusPage for empty state




commit 409f6598d9d6f75f2c1b2a7506b82377d1e8da7f
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Sep 4 13:45:15 2021 -0700

    history-box: Use HdyStatusPage for empty state
    
    We have a standard widget for empty states in HdyStatusPage.
    This commit uses that instead of rolling our own.

 src/ui/history-box.ui | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/src/ui/history-box.ui b/src/ui/history-box.ui
index 8e6b4ced..e5e78ba6 100644
--- a/src/ui/history-box.ui
+++ b/src/ui/history-box.ui
@@ -4,33 +4,10 @@
   <requires lib="gtk+" version="3.22"/>
   <template class="CallsHistoryBox" parent="GtkStack">
     <child>
-      <object class="GtkBox" id="empty">
-        <property name="visible">1</property>
-        <property name="halign">center</property>
-        <property name="valign">center</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
-        <child>
-          <object class="GtkImage">
-            <property name="visible">1</property>
-            <property name="icon-name">call-start-symbolic</property>
-            <property name="pixel-size">96</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkLabel" id="primary_label">
-            <property name="visible">1</property>
-            <property name="label" translatable="yes">No Recent Calls</property>
-            <property name="halign">start</property>
-            <attributes>
-              <attribute name="weight" value="bold"/>
-              <attribute name="scale" value="1.2"/>
-            </attributes>
-          </object>
-        </child>
-        <style>
-         <class name="dim-label"/>
-        </style>
+      <object class="HdyStatusPage">
+        <property name="visible">True</property>
+        <property name="icon-name">call-start-symbolic</property>
+        <property name="title" translatable="yes">No Recent Calls</property>
       </object>
       <packing>
         <property name="name">empty</property>


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