[gnome-contacts/wip/cdavis/hdy-style-updates: 6/10] contact-page: Use HdyStatusPage for empty view
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/cdavis/hdy-style-updates: 6/10] contact-page: Use HdyStatusPage for empty view
- Date: Sat, 13 Feb 2021 09:44:41 +0000 (UTC)
commit 4b9d5c2dc79454c18ab693ca7d6f5e886539ec4c
Author: Christopher Davis <brainblasted disroot org>
Date: Fri Feb 5 21:37:04 2021 -0800
contact-page: Use HdyStatusPage for empty view
libhandy now ships a pre-built empty view. Apps
should use that for consistency.
data/ui/contacts-contact-pane.ui | 32 +++-----------------------------
meson.build | 2 +-
src/contacts-contact-pane.vala | 2 +-
3 files changed, 5 insertions(+), 31 deletions(-)
---
diff --git a/data/ui/contacts-contact-pane.ui b/data/ui/contacts-contact-pane.ui
index d4efd848..bf5282a0 100644
--- a/data/ui/contacts-contact-pane.ui
+++ b/data/ui/contacts-contact-pane.ui
@@ -20,38 +20,12 @@
<property name="visible">True</property>
<property name="visible-child">none_selected_page</property>
<child>
- <object class="GtkGrid" id="none_selected_page">
+ <object class="HdyStatusPage" id="none_selected_page">
<property name="visible">True</property>
- <property name="width_request">300</property>
- <property name="orientation">vertical</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon_name">avatar-default-symbolic</property>
- <property name="vexpand">True</property>
- <property name="valign">end</property>
- <property name="pixel_size">144</property>
- <style>
- <class name="contacts-watermark"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Select a contact</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="valign">start</property>
- <property name="margin_bottom">70</property>
- <style>
- <class name="contacts-watermark"/>
- </style>
- </object>
- </child>
+ <property name="icon_name">avatar-default-symbolic</property>
+ <property name="title" translatable="yes">Select a Contact</property>
</object>
<packing>
<property name="name">none-selected-page</property>
diff --git a/meson.build b/meson.build
index 15062b4e..37fa8202 100644
--- a/meson.build
+++ b/meson.build
@@ -50,7 +50,7 @@ gmodule_export = dependency('gmodule-export-2.0', version: '>=' + min_glib_versi
gnome_desktop = dependency('gnome-desktop-3.0')
goa = dependency('goa-1.0')
gtk = dependency('gtk+-3.0', version: '>= 3.23.1')
-libhandy = dependency('libhandy-1', version: '>= 1.0.0')
+libhandy = dependency('libhandy-1', version: '>= 1.1.0')
# E-D-S
libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
libedataserver = dependency('libedataserver-1.2', version: '>=' + min_eds_version)
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 10a8af97..eae68ae1 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -37,7 +37,7 @@ public class Contacts.ContactPane : Gtk.ScrolledWindow {
private Gtk.Stack stack;
[GtkChild]
- private Gtk.Grid none_selected_page;
+ private Hdy.StatusPage none_selected_page;
[GtkChild]
private Gtk.Container contact_sheet_page;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]