[nautilus/wip/cdavis/hdystatuspage] ui: Use GNOME 40 Empty View Styling




commit 590304414dceddd6332c84d79f25c5a625693e4a
Author: Christopher Davis <brainblasted disroot org>
Date:   Fri Feb 12 21:29:46 2021 -0800

    ui: Use GNOME 40 Empty View Styling
    
    We have a new widget in libhandy that provides
    the right styling for empty states and status pages
    across GNOME. We should make use of that instead
    of rolling our own.

 meson.build                                   |  2 +-
 src/resources/ui/nautilus-folder-is-empty.ui  | 44 +++------------------------
 src/resources/ui/nautilus-starred-is-empty.ui | 44 +++------------------------
 src/resources/ui/nautilus-trash-is-empty.ui   | 44 +++------------------------
 4 files changed, 13 insertions(+), 121 deletions(-)
---
diff --git a/meson.build b/meson.build
index f3e1ca4cb..b6037ed90 100644
--- a/meson.build
+++ b/meson.build
@@ -120,7 +120,7 @@ gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
 gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.3.0')
 gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
 gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
-libhandy = dependency('libhandy-1', version: '>= 1.0.0')
+libhandy = dependency('libhandy-1', version: '>= 1.1.90')
 libportal = []
 if get_option('libportal')
   libportal = dependency('libportal', version: '>= 0.3')
diff --git a/src/resources/ui/nautilus-folder-is-empty.ui b/src/resources/ui/nautilus-folder-is-empty.ui
index 22031ba9b..04cfd3729 100644
--- a/src/resources/ui/nautilus-folder-is-empty.ui
+++ b/src/resources/ui/nautilus-folder-is-empty.ui
@@ -2,45 +2,9 @@
 <!-- Generated with glade 3.22.0 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
-  <object class="GtkGrid" id="folder_is_empty">
-    <property name="can_focus">False</property>
-    <property name="halign">center</property>
-    <property name="valign">center</property>
-    <property name="hexpand">True</property>
-    <property name="vexpand">True</property>
-    <property name="row_spacing">12</property>
-    <child>
-      <object class="GtkImage">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="pixel_size">80</property>
-        <property name="icon_name">folder-symbolic</property>
-        <style>
-          <class name="dim-label"/>
-        </style>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">0</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkLabel">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">Folder is Empty</property>
-        <attributes>
-          <attribute name="weight" value="bold"/>
-          <attribute name="scale" value="1.4399999999999999"/>
-        </attributes>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">1</property>
-      </packing>
-    </child>
-    <style>
-      <class name="dim-label"/>
-    </style>
+  <object class="HdyStatusPage" id="folder_is_empty">
+    <property name="visible">True</property>
+    <property name="icon_name">folder-symbolic</property>
+    <property name="title" translatable="yes">Folder is Empty</property>
   </object>
 </interface>
diff --git a/src/resources/ui/nautilus-starred-is-empty.ui b/src/resources/ui/nautilus-starred-is-empty.ui
index 04465cd44..87bbaec3a 100644
--- a/src/resources/ui/nautilus-starred-is-empty.ui
+++ b/src/resources/ui/nautilus-starred-is-empty.ui
@@ -2,45 +2,9 @@
 <!-- Generated with glade 3.22.0 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
-  <object class="GtkGrid" id="starred_is_empty">
-    <property name="can_focus">False</property>
-    <property name="halign">center</property>
-    <property name="valign">center</property>
-    <property name="hexpand">True</property>
-    <property name="vexpand">True</property>
-    <property name="row_spacing">12</property>
-    <child>
-      <object class="GtkImage">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="pixel_size">80</property>
-        <property name="icon_name">starred-symbolic</property>
-        <style>
-          <class name="dim-label"/>
-        </style>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">0</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkLabel">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">Starred files will appear here</property>
-        <attributes>
-          <attribute name="weight" value="bold"/>
-          <attribute name="scale" value="1.4399999999999999"/>
-        </attributes>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">1</property>
-      </packing>
-    </child>
-    <style>
-      <class name="dim-label"/>
-    </style>
+  <object class="HdyStatusPage" id="starred_is_empty">
+    <property name="visible">True</property>
+    <property name="icon_name">starred-symbolic</property>
+    <property name="title" translatable="yes">Starred Files Will Appear Here</property>
   </object>
 </interface>
diff --git a/src/resources/ui/nautilus-trash-is-empty.ui b/src/resources/ui/nautilus-trash-is-empty.ui
index 528f21d58..7952cf1f8 100644
--- a/src/resources/ui/nautilus-trash-is-empty.ui
+++ b/src/resources/ui/nautilus-trash-is-empty.ui
@@ -2,45 +2,9 @@
 <!-- Generated with glade 3.22.0 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
-  <object class="GtkGrid" id="trash_is_empty">
-    <property name="can_focus">False</property>
-    <property name="halign">center</property>
-    <property name="valign">center</property>
-    <property name="hexpand">True</property>
-    <property name="vexpand">True</property>
-    <property name="row_spacing">12</property>
-    <child>
-      <object class="GtkImage">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="pixel_size">80</property>
-        <property name="icon_name">user-trash-symbolic</property>
-        <style>
-          <class name="dim-label"/>
-        </style>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">0</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkLabel">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">Trash is Empty</property>
-        <attributes>
-          <attribute name="weight" value="bold"/>
-          <attribute name="scale" value="1.4399999999999999"/>
-        </attributes>
-      </object>
-      <packing>
-        <property name="left_attach">0</property>
-        <property name="top_attach">1</property>
-      </packing>
-    </child>
-    <style>
-      <class name="dim-label"/>
-    </style>
+  <object class="HdyStatusPage" id="trash_is_empty">
+    <property name="visible">True</property>
+    <property name="icon_name">user-trash-symbolic</property>
+    <property name="title" translatable="yes">Trash is Empty</property>
   </object>
 </interface>


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