[libadwaita/wip/exalm/pill: 4/4] examples: Use icon-less status pages instead of manual labels
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/pill: 4/4] examples: Use icon-less status pages instead of manual labels
- Date: Thu, 12 Aug 2021 12:40:25 +0000 (UTC)
commit be2433327a71df936306bf03c8b0bb4a68d2ea7a
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Aug 12 16:52:23 2021 +0500
examples: Use icon-less status pages instead of manual labels
examples/adw-demo-preferences-window.ui | 50 +++++--------------------------
examples/adw-demo-window.ui | 53 +++++++--------------------------
2 files changed, 18 insertions(+), 85 deletions(-)
---
diff --git a/examples/adw-demo-preferences-window.ui b/examples/adw-demo-preferences-window.ui
index ac90a0b0..7c4cfb72 100644
--- a/examples/adw-demo-preferences-window.ui
+++ b/examples/adw-demo-preferences-window.ui
@@ -170,26 +170,9 @@
</object>
</child>
</template>
- <object class="GtkBox" id="subpage1">
- <property name="orientation">vertical</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
- <property name="hexpand">True</property>
- <property name="spacing">24</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">This is a subpage</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <style>
- <class name="title"/>
- <class name="large-title"/>
- </style>
- </object>
- </child>
- <child>
+ <object class="AdwStatusPage" id="subpage1">
+ <property name="title" translatable="yes">This is a subpage</property>
+ <property name="child">
<object class="GtkButton">
<property name="label" translatable="yes">Return to the preferences</property>
<property name="halign">center</property>
@@ -199,28 +182,11 @@
<class name="pill"/>
</style>
</object>
- </child>
+ </property>
</object>
- <object class="GtkBox" id="subpage2">
- <property name="orientation">vertical</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
- <property name="hexpand">True</property>
- <property name="spacing">24</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">This is another subpage</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <style>
- <class name="title"/>
- <class name="large-title"/>
- </style>
- </object>
- </child>
- <child>
+ <object class="AdwStatusPage" id="subpage2">
+ <property name="title" translatable="yes">This is another subpage</property>
+ <property name="child">
<object class="GtkButton">
<property name="label" translatable="yes">Return to the preferences</property>
<property name="halign">center</property>
@@ -230,6 +196,6 @@
<class name="pill"/>
</style>
</object>
- </child>
+ </property>
</object>
</interface>
diff --git a/examples/adw-demo-window.ui b/examples/adw-demo-window.ui
index 4f1215fd..f2fd2f14 100644
--- a/examples/adw-demo-window.ui
+++ b/examples/adw-demo-window.ui
@@ -559,36 +559,21 @@
</object>
</child>
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
+ <object class="AdwStatusPage">
+ <property name="title" translatable="yes">Another page</property>
<property name="hexpand">True</property>
- <property name="spacing">24</property>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Another page</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <style>
- <class name="title"/>
- <class name="large-title"/>
- </style>
- </object>
- </child>
- <child>
+ <property name="child">
<object class="GtkButton">
<property name="label" translatable="yes">_Return to the first
page</property>
<property name="use-underline">True</property>
+ <property name="halign">center</property>
<signal name="clicked" handler="carousel_return_clicked_cb"
swapped="no"/>
<style>
<class name="suggested-action"/>
<class name="pill"/>
</style>
</object>
- </child>
+ </property>
</object>
</child>
</object>
@@ -873,31 +858,13 @@
</object>
</child>
<child>
- <object class="GtkScrolledWindow">
- <property name="hscrollbar-policy">never</property>
- <property name="vexpand">True</property>
- <child>
+ <object class="AdwStatusPage">
+ <property name="title" translatable="yes">Go back</property>
+ <property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="valign">center</property>
- <property name="margin-top">12</property>
- <property name="margin-bottom">12</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
+ <property name="halign">center</property>
<property name="spacing">12</property>
- <child>
- <object class="GtkLabel">
- <property name="halign">center</property>
- <property name="label" translatable="yes">Go back</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <style>
- <class name="title"/>
- <class name="large-title"/>
- </style>
- </object>
- </child>
<child>
<object class="GtkImage">
<property name="icon-name">gesture-touchscreen-swipe-back-symbolic</property>
@@ -917,7 +884,7 @@
</object>
</child>
</object>
- </child>
+ </property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]