[gnome-disk-utility/wip/cdavis/ui-cleanups: 7/31] ui: Use HdyStatusPage for empty view




commit d334797349fe281062692e989aa48a8282ab159a
Author: Christopher Davis <brainblasted disroot org>
Date:   Tue Feb 2 17:51:17 2021 -0800

    ui: Use HdyStatusPage for empty view
    
    libhandy got a built-in status page we should use
    for consistent styling across apps.

 meson.build           |  2 +-
 src/disks/ui/disks.ui | 41 ++++-------------------------------------
 2 files changed, 5 insertions(+), 38 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2d067a08..ea31c07c 100644
--- a/meson.build
+++ b/meson.build
@@ -73,7 +73,7 @@ gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.31.0')
 gmodule_dep = dependency('gmodule-2.0')
 gtk_dep = dependency('gtk+-3.0', version: '>= 3.16.0')
 libcanberra_dep = dependency('libcanberra-gtk3', version: '>= 0.1')
-libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0', fallback: ['libhandy', 'libhandy_dep'])
+libhandy_dep = dependency('libhandy-1', version: '>= 1.1.0', fallback: ['libhandy', 'libhandy_dep'])
 liblzma_dep = dependency('liblzma', version: '>= 5.0.5')
 libnotify_dep = dependency('libnotify', version: '>= 0.7')
 libsecret_dep = dependency('libsecret-1', version: '>= 0.7')
diff --git a/src/disks/ui/disks.ui b/src/disks/ui/disks.ui
index eaca4f5e..8eaf0dc3 100644
--- a/src/disks/ui/disks.ui
+++ b/src/disks/ui/disks.ui
@@ -174,44 +174,11 @@
                     <property name="margin_bottom">12</property>
                     <property name="expand">True</property>
                     <child>
-                      <object class="GtkBox" id="disks-empty-state-box">
+                      <object class="HdyStatusPage" id="disks-empty-state-box">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <property name="valign">center</property>
-                        <property name="spacing">12</property>
-                        <child>
-                          <object class="GtkImage" id="select-device-image">
-                            <property name="visible">True</property>
-                            <property name="icon_name">drive-multidisk-symbolic</property>
-                            <property name="pixel_size">128</property>
-                            <style>
-                              <class name="dim-label"/>
-                            </style>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="select-device-title">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">No Device Selected</property>
-                            <property name="yalign">0</property>
-                            <style>
-                              <class name="title-1"/>
-                              <class name="dim-label"/>
-                            </style>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="select-device-label">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Select a device to manage</property>
-                            <property name="yalign">0</property>
-                            <style>
-                              <class name="dim-label"/>
-                            </style>
-                          </object>
-                        </child>
+                        <property name="icon_name">drive-multidisk-symbolic</property>
+                        <property name="title" translatable="yes">No Device Selected</property>
+                        <property name="description" translatable="yes">Select a device to manage.</property>
                       </object>
                     </child>
                     <child>


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