[libadwaita/wip/exalm/swipe-group: 135/143] examples: Stop using AdwSwipeGroup
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/swipe-group: 135/143] examples: Stop using AdwSwipeGroup
- Date: Mon, 19 Apr 2021 15:12:37 +0000 (UTC)
commit 7f14f39287399ccb0cddf66a58e32b669ab96823
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Feb 26 14:18:27 2021 +0500
examples: Stop using AdwSwipeGroup
Move the leaflet subpage to span the whole window instead.
examples/adw-demo-window.c | 31 +-
examples/adw-demo-window.ui | 1341 +++++++++++++++++++++----------------------
2 files changed, 654 insertions(+), 718 deletions(-)
---
diff --git a/examples/adw-demo-window.c b/examples/adw-demo-window.c
index 90f8572..d368b17 100644
--- a/examples/adw-demo-window.c
+++ b/examples/adw-demo-window.c
@@ -10,12 +10,11 @@ struct _AdwDemoWindow
AdwLeaflet *content_box;
GtkBox *right_box;
- GtkStack *header_stack;
GtkImage *theme_variant;
GtkStackSidebar *sidebar;
GtkStack *stack;
AdwComboRow *leaflet_transition_row;
- AdwLeaflet *content_leaflet;
+ AdwLeaflet *subpage_leaflet;
GtkListBox *lists_listbox;
AdwCarousel *carousel;
GtkBox *carousel_box;
@@ -54,30 +53,11 @@ prefer_dark_theme_to_icon_name_cb (GBinding *binding,
return TRUE;
}
-static void
-update (AdwDemoWindow *self)
-{
- const char *header_bar_name = "default";
-
- if (g_strcmp0 (gtk_stack_get_visible_child_name (self->stack), "leaflet") == 0)
- header_bar_name = "leaflet";
-
- gtk_stack_set_visible_child_name (self->header_stack, header_bar_name);
-}
-
-static void
-notify_leaflet_visible_child_cb (AdwDemoWindow *self)
-{
- update (self);
-}
-
static void
notify_visible_child_cb (GObject *sender,
GParamSpec *pspec,
AdwDemoWindow *self)
{
- update (self);
-
adw_leaflet_navigate (self->content_box, ADW_NAVIGATION_DIRECTION_FORWARD);
}
@@ -92,7 +72,7 @@ static void
leaflet_back_clicked_cb (GtkWidget *sender,
AdwDemoWindow *self)
{
- adw_leaflet_navigate (self->content_leaflet, ADW_NAVIGATION_DIRECTION_BACK);
+ adw_leaflet_navigate (self->subpage_leaflet, ADW_NAVIGATION_DIRECTION_BACK);
}
static char *
@@ -131,7 +111,7 @@ leaflet_go_next_row_activated_cb (AdwDemoWindow *self)
{
g_assert (ADW_IS_DEMO_WINDOW (self));
- adw_leaflet_navigate (self->content_leaflet, ADW_NAVIGATION_DIRECTION_FORWARD);
+ adw_leaflet_navigate (self->subpage_leaflet, ADW_NAVIGATION_DIRECTION_FORWARD);
}
static void
@@ -429,12 +409,11 @@ adw_demo_window_class_init (AdwDemoWindowClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Adwaita/Demo/ui/adw-demo-window.ui");
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, content_box);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, right_box);
- gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, header_stack);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, theme_variant);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, sidebar);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, stack);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, leaflet_transition_row);
- gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, content_leaflet);
+ gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, subpage_leaflet);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, lists_listbox);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, carousel_box);
@@ -446,7 +425,6 @@ adw_demo_window_class_init (AdwDemoWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, avatar_remove_button);
gtk_widget_class_bind_template_child (widget_class, AdwDemoWindow, avatar_contacts);
gtk_widget_class_bind_template_callback (widget_class, notify_visible_child_cb);
- gtk_widget_class_bind_template_callback (widget_class, notify_leaflet_visible_child_cb);
gtk_widget_class_bind_template_callback (widget_class, back_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, leaflet_back_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, leaflet_transition_name);
@@ -505,7 +483,6 @@ adw_demo_window_init (AdwDemoWindow *self)
NULL);
avatar_page_init (self);
- update (self);
adw_leaflet_set_visible_child (self->content_box, GTK_WIDGET (self->right_box));
}
diff --git a/examples/adw-demo-window.ui b/examples/adw-demo-window.ui
index 40a5b79..f675fce 100644
--- a/examples/adw-demo-window.ui
+++ b/examples/adw-demo-window.ui
@@ -16,173 +16,117 @@
<property name="default_width">800</property>
<property name="default_height">576</property>
<child>
- <object class="AdwLeaflet" id="content_box">
+ <object class="AdwLeaflet" id="subpage_leaflet">
<property name="can-swipe-back">True</property>
<property name="width-request">360</property>
+ <property name="can-unfold">False</property>
+ <property name="transition-type" bind-source="content_box" bind-property="transition-type"
bind-flags="sync-create"/>
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="AdwHeaderBar" id="header_bar">
- <property name="show-end-title-buttons" bind-source="content_box" bind-property="folded"
bind-flags="sync-create"/>
- <child type="start">
- <object class="GtkButton" id="theme_variant">
- <signal name="clicked" handler="theme_variant_button_clicked_cb" swapped="yes"/>
- </object>
- </child>
- <child type="end">
- <object class="GtkMenuButton" id="menu_button">
- <property name="menu-model">primary_menu</property>
- <property name="icon-name">open-menu-symbolic</property>
- </object>
- </child>
- </object>
- </child>
+ <object class="AdwLeaflet" id="content_box">
+ <property name="can-swipe-back">True</property>
<child>
- <object class="GtkStackSidebar" id="sidebar">
- <property name="width_request">270</property>
- <property name="vexpand">True</property>
- <property name="stack">stack</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwLeafletPage">
- <property name="navigatable">False</property>
- <property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
- <object class="GtkWindowHandle" id="header_separator">
- <child>
- <object class="GtkSeparator">
- <property name="orientation">vertical</property>
- <style>
- <class name="sidebar"/>
- </style>
+ <object class="AdwHeaderBar" id="left_header_bar">
+ <property name="show-end-title-buttons" bind-source="content_box" bind-property="folded"
bind-flags="sync-create"/>
+ <child type="start">
+ <object class="GtkButton" id="theme_variant">
+ <signal name="clicked" handler="theme_variant_button_clicked_cb" swapped="yes"/>
+ </object>
+ </child>
+ <child type="end">
+ <object class="GtkMenuButton" id="menu_button">
+ <property name="menu-model">primary_menu</property>
+ <property name="icon-name">open-menu-symbolic</property>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkSeparator">
- <property name="orientation">vertical</property>
+ <object class="GtkStackSidebar" id="sidebar">
+ <property name="width_request">270</property>
<property name="vexpand">True</property>
- <style>
- <class name="sidebar"/>
- </style>
+ <property name="stack">stack</property>
</object>
</child>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="right_box">
- <property name="orientation">vertical</property>
- <property name="hexpand">True</property>
+ </child>
<child>
- <object class="GtkStack" id="header_stack">
- <property name="transition-type" bind-source="stack" bind-property="transition-type"
bind-flags="sync-create"/>
- <child>
- <object class="GtkStackPage">
- <property name="name">default</property>
- <property name="child">
- <object class="AdwHeaderBar" id="default_header_bar">
- <property name="show-start-title-buttons" bind-source="content_box"
bind-property="folded" bind-flags="sync-create"/>
- <property name="title-widget">
- <object class="GtkBox"/>
- </property>
- <child type="start">
- <object class="GtkButton" id="back">
- <property name="valign">center</property>
- <property name="tooltip-text" translatable="yes">Back</property>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="visible" bind-source="content_box" bind-property="folded"
bind-flags="sync-create"/>
- <signal name="clicked" handler="back_clicked_cb"/>
- </object>
- </child>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">leaflet</property>
- <property name="child">
- <object class="AdwLeaflet" id="header_leaflet">
- <property name="can-unfold">False</property>
- <property name="can-swipe-back">True</property>
- <property name="transition-type" bind-source="content_box"
bind-property="transition-type" bind-flags="sync-create"/>
- <child>
- <object class="AdwHeaderBar" id="leaflet_header_bar">
- <property name="show-start-title-buttons" bind-source="content_box"
bind-property="folded" bind-flags="sync-create"/>
- <property name="title-widget">
- <object class="GtkBox"/>
- </property>
- <child type="start">
- <object class="GtkButton" id="leaflet-back">
- <property name="valign">center</property>
- <property name="tooltip-text" translatable="yes">Back</property>
- <property name="icon-name">go-previous-symbolic</property>
- <property name="visible" bind-source="content_box" bind-property="folded"
bind-flags="sync-create"/>
- <signal name="clicked" handler="back_clicked_cb"/>
- </object>
- </child>
- </object>
- </child>
+ <object class="AdwLeafletPage">
+ <property name="navigatable">False</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkWindowHandle" id="header_separator">
<child>
- <object class="AdwHeaderBar" id="leaflet_sub_header_bar">
- <property name="show-start-title-buttons" bind-source="content_box"
bind-property="folded" bind-flags="sync-create"/>
- <property name="title-widget">
- <object class="GtkBox"/>
- </property>
- <child type="start">
- <object class="GtkButton" id="leaflet-sub-back">
- <property name="valign">center</property>
- <property name="tooltip-text" translatable="yes">Back</property>
- <property name="icon-name">go-previous-symbolic</property>
- <signal name="clicked" handler="leaflet_back_clicked_cb"/>
- </object>
- </child>
+ <object class="GtkSeparator">
+ <property name="orientation">vertical</property>
+ <style>
+ <class name="sidebar"/>
+ </style>
</object>
</child>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="orientation">vertical</property>
+ <property name="vexpand">True</property>
+ <style>
+ <class name="sidebar"/>
+ </style>
+ </object>
+ </child>
</object>
- </child>
+ </property>
</object>
</child>
<child>
- <object class="GtkStack" id="stack">
- <property name="vexpand">True</property>
- <property name="vhomogeneous">False</property>
- <signal name="notify::visible-child" handler="notify_visible_child_cb" after="yes"
swapped="no"/>
+ <object class="GtkBox" id="right_box">
+ <property name="orientation">vertical</property>
+ <property name="hexpand">True</property>
<child>
- <object class="GtkStackPage">
- <property name="name">welcome</property>
- <property name="title" translatable="yes">Welcome</property>
- <property name="child">
- <object class="AdwStatusPage">
- <property name="icon-name">gnome-smartphone-symbolic</property>
- <property name="title" translatable="yes">Welcome to Adwaita Demo</property>
- <property name="description" translatable="yes">This is a tour of the features the
library has to offer.</property>
- </object>
+ <object class="AdwHeaderBar" id="right_header_bar">
+ <property name="show-start-title-buttons" bind-source="content_box"
bind-property="folded" bind-flags="sync-create"/>
+ <property name="title-widget">
+ <object class="GtkBox"/>
</property>
+ <child type="start">
+ <object class="GtkButton" id="back">
+ <property name="valign">center</property>
+ <property name="tooltip-text" translatable="yes">Back</property>
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="visible" bind-source="content_box" bind-property="folded"
bind-flags="sync-create"/>
+ <signal name="clicked" handler="back_clicked_cb"/>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkStackPage">
- <property name="name">leaflet</property>
- <property name="title" translatable="yes">Leaflet</property>
- <property name="child">
- <object class="AdwLeaflet" id="content_leaflet">
- <property name="can-unfold">False</property>
- <property name="can-swipe-back">True</property>
- <property name="transition-type" bind-source="content_box"
bind-property="transition-type" bind-flags="sync-create"/>
- <signal name="notify::visible-child" handler="notify_leaflet_visible_child_cb"
after="yes" swapped="yes"/>
- <child>
+ <object class="GtkStack" id="stack">
+ <property name="vexpand">True</property>
+ <property name="vhomogeneous">False</property>
+ <signal name="notify::visible-child" handler="notify_visible_child_cb" after="yes"
swapped="no"/>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">welcome</property>
+ <property name="title" translatable="yes">Welcome</property>
+ <property name="child">
+ <object class="AdwStatusPage">
+ <property name="icon-name">gnome-smartphone-symbolic</property>
+ <property name="title" translatable="yes">Welcome to Adwaita Demo</property>
+ <property name="description" translatable="yes">This is a tour of the features
the library has to offer.</property>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">leaflet</property>
+ <property name="title" translatable="yes">Leaflet</property>
+ <property name="child">
<object class="AdwStatusPage">
<property name="icon-name">widget-leaflet-symbolic</property>
<property name="title" translatable="yes">Leaflet</property>
@@ -228,550 +172,409 @@
</object>
</property>
</object>
- </child>
- <child>
- <object class="GtkScrolledWindow">
- <property name="hscrollbar-policy">never</property>
- <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="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>
- <property name="pixel-size">128</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkImage">
- <property
name="icon-name">gesture-touchpad-swipe-back-symbolic</property>
- <property name="pixel-size">128</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
+ </property>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">clamp</property>
- <property name="title" translatable="yes">Clamp</property>
- <property name="child">
- <object class="AdwStatusPage">
- <property name="icon-name">widget-clamp-symbolic</property>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">clamp</property>
<property name="title" translatable="yes">Clamp</property>
- <property name="description" translatable="yes">This page is clamped to smoothly
grow up to a maximum width.</property>
<property name="child">
- <object class="AdwClamp">
- <property name="maximum-size" bind-source="clamp_maximum_size_adjustment"
bind-property="value" bind-flags="sync-create"/>
- <property name="tightening-threshold"
bind-source="clamp_tightening_threshold_adjustment" bind-property="value" bind-flags="sync-create"/>
+ <object class="AdwStatusPage">
+ <property name="icon-name">widget-clamp-symbolic</property>
+ <property name="title" translatable="yes">Clamp</property>
+ <property name="description" translatable="yes">This page is clamped to smoothly
grow up to a maximum width.</property>
<property name="child">
- <object class="GtkListBox" id="clamp_listbox">
- <property name="selection-mode">none</property>
- <style>
- <class name="content"/>
- </style>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Maximum width</property>
+ <object class="AdwClamp">
+ <property name="maximum-size" bind-source="clamp_maximum_size_adjustment"
bind-property="value" bind-flags="sync-create"/>
+ <property name="tightening-threshold"
bind-source="clamp_tightening_threshold_adjustment" bind-property="value" bind-flags="sync-create"/>
+ <property name="child">
+ <object class="GtkListBox" id="clamp_listbox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
<child>
- <object class="GtkSpinButton">
- <property name="adjustment">clamp_maximum_size_adjustment</property>
- <property name="valign">center</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Maximum width</property>
+ <child>
+ <object class="GtkSpinButton">
+ <property
name="adjustment">clamp_maximum_size_adjustment</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Tightening threshold</property>
<child>
- <object class="GtkSpinButton">
- <property
name="adjustment">clamp_tightening_threshold_adjustment</property>
- <property name="valign">center</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Tightening
threshold</property>
+ <child>
+ <object class="GtkSpinButton">
+ <property
name="adjustment">clamp_tightening_threshold_adjustment</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
</object>
</child>
</object>
- </child>
+ </property>
</object>
</property>
</object>
</property>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">lists</property>
- <property name="title" translatable="yes">Lists</property>
- <property name="child">
- <object class="AdwStatusPage">
- <property name="icon-name">widget-list-symbolic</property>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">lists</property>
<property name="title" translatable="yes">Lists</property>
- <property name="description" translatable="yes">Rows and helpers for
GtkListBox.</property>
<property name="child">
- <object class="AdwClamp">
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
+ <object class="AdwStatusPage">
+ <property name="icon-name">widget-list-symbolic</property>
+ <property name="title" translatable="yes">Lists</property>
+ <property name="description" translatable="yes">Rows and helpers for
GtkListBox.</property>
<property name="child">
- <object class="GtkListBox" id="lists_listbox">
- <property name="selection-mode">none</property>
- <style>
- <class name="content"/>
- </style>
- <child>
- <object class="AdwActionRow">
- <property name="icon-name">row-preferences-symbolic</property>
- <property name="subtitle" translatable="yes">They also have a subtitle
and an icon</property>
- <property name="title" translatable="yes">Rows have a title</property>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="activatable_widget">frobnicate</property>
- <property name="title" translatable="yes">Rows can have action
widgets</property>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
+ <property name="child">
+ <object class="GtkListBox" id="lists_listbox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
<child>
- <object class="GtkButton" id="frobnicate">
- <property name="halign">end</property>
- <property name="label" translatable="yes">Frobnicate</property>
- <property name="valign">center</property>
- <style>
- <class name="list-button"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="activatable_widget">radio_button_1</property>
- <property name="title" translatable="yes">Rows can have prefix
widgets</property>
- <child type="prefix">
- <object class="GtkCheckButton" id="radio_button_1">
- <property name="valign">center</property>
- <property name="active">True</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="activatable_widget">radio_button_2</property>
- <property name="title" translatable="yes">Rows can have prefix
widgets</property>
- <child type="prefix">
- <object class="GtkCheckButton" id="radio_button_2">
- <property name="group">radio_button_1</property>
- <property name="valign">center</property>
+ <object class="AdwActionRow">
+ <property name="icon-name">row-preferences-symbolic</property>
+ <property name="subtitle" translatable="yes">They also have a
subtitle and an icon</property>
+ <property name="title" translatable="yes">Rows have a
title</property>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwComboRow" id="combo_row">
- <property name="title" translatable="yes">Combo row</property>
- <property name="model">
- <object class="GtkStringList">
- <items>
- <item>Foo</item>
- <item>Bar</item>
- <item>Baz</item>
- </items>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="AdwComboRow" id="enum_combo_row">
- <property name="subtitle" translatable="yes">This combo row was created
from an enumeration</property>
- <property name="title" translatable="yes">Enumeration combo
row</property>
- <property name="model">
- <object class="AdwEnumListModel">
- <property name="enum-type">GtkLicense</property>
- </object>
- </property>
- <property name="expression">
- <lookup type="AdwEnumValueObject" name="nick"/>
- </property>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow" id="expander_row">
- <property name="title" translatable="yes">Expander row</property>
<child>
- <object class="GtkListBoxRow">
- <property name="activatable">False</property>
+ <object class="AdwActionRow">
+ <property name="activatable_widget">frobnicate</property>
+ <property name="title" translatable="yes">Rows can have action
widgets</property>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Hello,
world!</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>
+ <object class="GtkButton" id="frobnicate">
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Frobnicate</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="list-button"/>
+ </style>
</object>
</child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow" id="action_expander_row">
- <property name="title" translatable="yes">Expander row with an
action</property>
- <child type="action">
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">row-copy-symbolic</property>
- <style>
- <class name="list-button"/>
- </style>
- </object>
- </child>
<child>
<object class="AdwActionRow">
- <property name="title" translatable="yes">A nested row</property>
+ <property name="activatable_widget">radio_button_1</property>
+ <property name="title" translatable="yes">Rows can have prefix
widgets</property>
+ <child type="prefix">
+ <object class="GtkCheckButton" id="radio_button_1">
+ <property name="valign">center</property>
+ <property name="active">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
<object class="AdwActionRow">
- <property name="title" translatable="yes">Another nested
row</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow">
- <property name="title" translatable="yes">Expander row with a
prefix</property>
- <child type="prefix">
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">row-shutdown-symbolic</property>
- <style>
- <class name="list-button"/>
- </style>
+ <property name="activatable_widget">radio_button_2</property>
+ <property name="title" translatable="yes">Rows can have prefix
widgets</property>
+ <child type="prefix">
+ <object class="GtkCheckButton" id="radio_button_2">
+ <property name="group">radio_button_1</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">A nested row</property>
+ <object class="AdwComboRow" id="combo_row">
+ <property name="title" translatable="yes">Combo row</property>
+ <property name="model">
+ <object class="GtkStringList">
+ <items>
+ <item>Foo</item>
+ <item>Bar</item>
+ <item>Baz</item>
+ </items>
+ </object>
+ </property>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Another nested
row</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow">
- <property name="title" translatable="yes">Expander row with a prefix and
icon</property>
- <property name="icon-name">row-forbidden-symbolic</property>
- <child type="prefix">
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">row-shutdown-symbolic</property>
- <style>
- <class name="list-button"/>
- </style>
+ <object class="AdwComboRow" id="enum_combo_row">
+ <property name="subtitle" translatable="yes">This combo row was
created from an enumeration</property>
+ <property name="title" translatable="yes">Enumeration combo
row</property>
+ <property name="model">
+ <object class="AdwEnumListModel">
+ <property name="enum-type">GtkLicense</property>
+ </object>
+ </property>
+ <property name="expression">
+ <lookup type="AdwEnumValueObject" name="nick"/>
+ </property>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">A nested row</property>
+ <object class="AdwExpanderRow" id="expander_row">
+ <property name="title" translatable="yes">Expander row</property>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="activatable">False</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Hello,
world!</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>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Another nested
row</property>
+ <object class="AdwExpanderRow" id="action_expander_row">
+ <property name="title" translatable="yes">Expander row with an
action</property>
+ <child type="action">
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">row-copy-symbolic</property>
+ <style>
+ <class name="list-button"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">A nested row</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Another nested
row</property>
+ </object>
+ </child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow" id="enable_expander_row">
- <property name="show_enable_switch">True</property>
- <property name="title" translatable="yes">Toggleable expander
row</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">A nested row</property>
+ <object class="AdwExpanderRow">
+ <property name="title" translatable="yes">Expander row with a
prefix</property>
+ <child type="prefix">
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">row-shutdown-symbolic</property>
+ <style>
+ <class name="list-button"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">A nested row</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Another nested
row</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Another nested
row</property>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="AdwExpanderRow" id="action_switch_expander_row">
- <property name="show_enable_switch">True</property>
- <property name="title" translatable="yes">Toggleable expander row with
an action</property>
- <child type="action">
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">row-copy-symbolic</property>
- <style>
- <class name="list-button"/>
- </style>
+ <object class="AdwExpanderRow">
+ <property name="title" translatable="yes">Expander row with a prefix
and icon</property>
+ <property name="icon-name">row-forbidden-symbolic</property>
+ <child type="prefix">
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">row-shutdown-symbolic</property>
+ <style>
+ <class name="list-button"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">A nested row</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Another nested
row</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">A nested row</property>
+ <object class="AdwExpanderRow" id="enable_expander_row">
+ <property name="show_enable_switch">True</property>
+ <property name="title" translatable="yes">Toggleable expander
row</property>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">A nested row</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Another nested
row</property>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Another nested
row</property>
+ <object class="AdwExpanderRow" id="action_switch_expander_row">
+ <property name="show_enable_switch">True</property>
+ <property name="title" translatable="yes">Toggleable expander row
with an action</property>
+ <child type="action">
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">row-copy-symbolic</property>
+ <style>
+ <class name="list-button"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">A nested row</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Another nested
row</property>
+ </object>
+ </child>
</object>
</child>
</object>
- </child>
+ </property>
</object>
</property>
</object>
</property>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">view-switcher</property>
- <property name="title" translatable="yes">View Switcher</property>
- <property name="child">
- <object class="AdwStatusPage">
- <property name="icon-name">widget-view-switcher-symbolic</property>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">view-switcher</property>
<property name="title" translatable="yes">View Switcher</property>
- <property name="description" translatable="yes">Widgets to switch the window's
view.</property>
- <child>
- <object class="GtkButton">
- <property name="label" translatable="yes">Run the demo</property>
- <property name="halign">center</property>
- <signal name="clicked" handler="view_switcher_demo_clicked_cb" swapped="no"/>
+ <property name="child">
+ <object class="AdwStatusPage">
+ <property name="icon-name">widget-view-switcher-symbolic</property>
+ <property name="title" translatable="yes">View Switcher</property>
+ <property name="description" translatable="yes">Widgets to switch the window's
view.</property>
+ <child>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Run the demo</property>
+ <property name="halign">center</property>
+ <signal name="clicked" handler="view_switcher_demo_clicked_cb" swapped="no"/>
+ </object>
+ </child>
</object>
- </child>
+ </property>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">carousel</property>
- <property name="title" translatable="yes">Carousel</property>
- <property name="child">
- <object class="GtkBox" id="carousel_box">
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="carousel_empty_box"/>
- </child>
- <child>
- <object class="AdwCarousel" id="carousel">
- <property name="vexpand">True</property>
- <property name="hexpand">True</property>
- <property name="allow-long-swipes" bind-source="carousel_long_swipes"
bind-property="active" bind-flags="sync-create|bidirectional"/>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">carousel</property>
+ <property name="title" translatable="yes">Carousel</property>
+ <property name="child">
+ <object class="GtkBox" id="carousel_box">
+ <property name="orientation">vertical</property>
<child>
- <object class="AdwStatusPage">
- <property name="icon-name">widget-carousel-symbolic</property>
- <property name="title" translatable="yes">Carousel</property>
- <property name="description" translatable="yes">A widget for paginated
scrolling.</property>
- </object>
+ <object class="GtkBox" id="carousel_empty_box"/>
</child>
<child>
- <object class="AdwClamp">
- <property name="margin-bottom">32</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
+ <object class="AdwCarousel" id="carousel">
+ <property name="vexpand">True</property>
+ <property name="hexpand">True</property>
+ <property name="allow-long-swipes" bind-source="carousel_long_swipes"
bind-property="active" bind-flags="sync-create|bidirectional"/>
<child>
- <object class="GtkListBox" id="carousel_listbox">
- <property name="valign">center</property>
- <property name="selection-mode">none</property>
- <style>
- <class name="content"/>
- </style>
+ <object class="AdwStatusPage">
+ <property name="icon-name">widget-carousel-symbolic</property>
+ <property name="title" translatable="yes">Carousel</property>
+ <property name="description" translatable="yes">A widget for paginated
scrolling.</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="margin-bottom">32</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
<child>
- <object class="AdwComboRow" id="carousel_orientation_row">
- <property name="title" translatable="yes">Orientation</property>
- <signal name="notify::selected"
handler="notify_carousel_orientation_cb" swapped="no"/>
- <property name="model">
- <object class="AdwEnumListModel">
- <property name="enum-type">GtkOrientation</property>
+ <object class="GtkListBox" id="carousel_listbox">
+ <property name="valign">center</property>
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
+ <child>
+ <object class="AdwComboRow" id="carousel_orientation_row">
+ <property name="title" translatable="yes">Orientation</property>
+ <signal name="notify::selected"
handler="notify_carousel_orientation_cb" swapped="no"/>
+ <property name="model">
+ <object class="AdwEnumListModel">
+ <property name="enum-type">GtkOrientation</property>
+ </object>
+ </property>
+ <property name="expression">
+ <closure type="gchararray"
function="carousel_orientation_name"/>
+ </property>
</object>
- </property>
- <property name="expression">
- <closure type="gchararray" function="carousel_orientation_name"/>
- </property>
- </object>
- </child>
- <child>
- <object class="AdwComboRow" id="carousel_indicators_row">
- <property name="title" translatable="yes">Page Indicators</property>
- <signal name="notify::selected"
handler="notify_carousel_indicators_cb" swapped="no"/>
- <property name="model">
- <object class="GtkStringList">
- <items>
- <item>dots</item>
- <item>lines</item>
- </items>
+ </child>
+ <child>
+ <object class="AdwComboRow" id="carousel_indicators_row">
+ <property name="title" translatable="yes">Page
Indicators</property>
+ <signal name="notify::selected"
handler="notify_carousel_indicators_cb" swapped="no"/>
+ <property name="model">
+ <object class="GtkStringList">
+ <items>
+ <item>dots</item>
+ <item>lines</item>
+ </items>
+ </object>
+ </property>
+ <property name="expression">
+ <closure type="gchararray"
function="carousel_indicators_name"/>
+ </property>
</object>
- </property>
- <property name="expression">
- <closure type="gchararray" function="carousel_indicators_name"/>
- </property>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Long swipes</property>
- <property name="activatable_widget">carousel_long_swipes</property>
+ </child>
<child>
- <object class="GtkSwitch" id="carousel_long_swipes">
- <property name="valign">center</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Long swipes</property>
+ <property
name="activatable_widget">carousel_long_swipes</property>
+ <child>
+ <object class="GtkSwitch" id="carousel_long_swipes">
+ <property name="valign">center</property>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
</object>
</child>
- </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>
- <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>
- <object class="GtkButton">
- <property name="label" translatable="yes">_Return to the first
page</property>
- <property name="use-underline">True</property>
- <signal name="clicked" handler="carousel_return_clicked_cb"
swapped="no"/>
- <style>
- <class name="suggested-action"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkStack" id="carousel_indicators_stack">
- <property name="vhomogeneous">False</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <child>
- <object class="GtkStackPage">
- <property name="name">dots</property>
- <property name="child">
- <object class="AdwCarouselIndicatorDots">
- <property name="carousel">carousel</property>
- <property name="orientation" bind-source="carousel"
bind-property="orientation" bind-flags="sync-create"/>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">lines</property>
- <property name="child">
- <object class="AdwCarouselIndicatorLines">
- <property name="carousel">carousel</property>
- <property name="orientation" bind-source="carousel"
bind-property="orientation" bind-flags="sync-create"/>
- </object>
- </property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">avatar</property>
- <property name="title" translatable="yes">Avatar</property>
- <property name="child">
- <object class="GtkScrolledWindow">
- <property name="hscrollbar-policy">never</property>
- <property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="valign">start</property>
- <style>
- <class name="avatar-page"/>
- </style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <child>
- <object class="AdwAvatar" id="avatar">
- <property name="valign">center</property>
- <property name="halign">center</property>
- <property name="size" bind-source="avatar_size"
bind-property="value" bind-flags="sync-create"></property>
- <property name="show-initials" bind-source="avatar_show_initials"
bind-property="state" bind-flags="sync-create"/>
- <property name="text" bind-source="avatar_text" bind-property="text"
bind-flags="sync-create"/>
- </object>
- </child>
+ <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">Avatar</property>
- <property name="halign">center</property>
- <property name="xalign">0</property>
+ <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>
- <property name="justify">center</property>
<style>
<class name="title"/>
<class name="large-title"/>
@@ -779,148 +582,310 @@
</object>
</child>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">A user avatar with
generated fallback.</property>
- <property name="justify">center</property>
- <property name="use_markup">true</property>
- <property name="wrap">True</property>
+ <object class="GtkButton">
+ <property name="label" translatable="yes">_Return to the first
page</property>
+ <property name="use-underline">True</property>
+ <signal name="clicked" handler="carousel_return_clicked_cb"
swapped="no"/>
<style>
- <class name="body"/>
- <class name="description"/>
+ <class name="suggested-action"/>
</style>
</object>
</child>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStack" id="carousel_indicators_stack">
+ <property name="vhomogeneous">False</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
<child>
- <object class="AdwClamp">
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
+ <object class="GtkStackPage">
+ <property name="name">dots</property>
+ <property name="child">
+ <object class="AdwCarouselIndicatorDots">
+ <property name="carousel">carousel</property>
+ <property name="orientation" bind-source="carousel"
bind-property="orientation" bind-flags="sync-create"/>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">lines</property>
<property name="child">
+ <object class="AdwCarouselIndicatorLines">
+ <property name="carousel">carousel</property>
+ <property name="orientation" bind-source="carousel"
bind-property="orientation" bind-flags="sync-create"/>
+ </object>
+ </property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">avatar</property>
+ <property name="title" translatable="yes">Avatar</property>
+ <property name="child">
+ <object class="GtkScrolledWindow">
+ <property name="hscrollbar-policy">never</property>
+ <property name="child">
+ <object class="GtkViewport">
+ <property name="scroll-to-focus">True</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="valign">start</property>
+ <style>
+ <class name="avatar-page"/>
+ </style>
+ <child>
<object class="GtkBox">
- <property name="valign">center</property>
<property name="orientation">vertical</property>
- <property name="spacing">12</property>
<child>
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
+ <object class="AdwAvatar" id="avatar">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="size" bind-source="avatar_size"
bind-property="value" bind-flags="sync-create"></property>
+ <property name="show-initials"
bind-source="avatar_show_initials" bind-property="state" bind-flags="sync-create"/>
+ <property name="text" bind-source="avatar_text"
bind-property="text" bind-flags="sync-create"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Avatar</property>
+ <property name="halign">center</property>
+ <property name="xalign">0</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="justify">center</property>
+ <style>
+ <class name="title"/>
+ <class name="large-title"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">A user avatar with
generated fallback.</property>
+ <property name="justify">center</property>
+ <property name="use_markup">true</property>
+ <property name="wrap">True</property>
<style>
- <class name="content"/>
+ <class name="body"/>
+ <class name="description"/>
</style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Text</property>
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
<child>
- <object class="GtkEntry" id="avatar_text">
- <property name="valign">center</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Text</property>
+ <child>
+ <object class="GtkEntry" id="avatar_text">
+ <property name="valign">center</property>
+ </object>
+ </child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Show
initials</property>
- <property
name="activatable_widget">avatar_show_initials</property>
<child>
- <object class="GtkSwitch" id="avatar_show_initials">
- <property name="valign">center</property>
- <property name="state">True</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Show
initials</property>
+ <property
name="activatable_widget">avatar_show_initials</property>
+ <child>
+ <object class="GtkSwitch" id="avatar_show_initials">
+ <property name="valign">center</property>
+ <property name="state">True</property>
+ </object>
+ </child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">File</property>
<child>
- <object class="GtkButton">
- <property name="valign">center</property>
- <signal name="clicked"
handler="avatar_file_chooser_clicked_cb" swapped="true"/>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">File</property>
<child>
- <object class="GtkLabel"
id="avatar_file_chooser_label">
- <property name="ellipsize">middle</property>
- <property name="max-width-chars">20</property>
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <signal name="clicked"
handler="avatar_file_chooser_clicked_cb" swapped="true"/>
+ <child>
+ <object class="GtkLabel"
id="avatar_file_chooser_label">
+ <property name="ellipsize">middle</property>
+ <property name="max-width-chars">20</property>
+ </object>
+ </child>
+ <style>
+ <class name="text-button"/>
+ <class name="list-button"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="avatar_remove_button">
+ <property name="valign">center</property>
+ <property
name="icon_name">avatar-delete-symbolic</property>
+ <signal name="clicked" swapped="yes"
handler="avatar_file_remove_cb"/>
</object>
</child>
- <style>
- <class name="text-button"/>
- <class name="list-button"/>
- </style>
</object>
</child>
<child>
- <object class="GtkButton" id="avatar_remove_button">
- <property name="valign">center</property>
- <property
name="icon_name">avatar-delete-symbolic</property>
- <signal name="clicked" swapped="yes"
handler="avatar_file_remove_cb"/>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Size</property>
+ <child>
+ <object class="GtkSpinButton" id="avatar_size">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property
name="adjustment">avatar_adjustment</property>
+ </object>
+ </child>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Size</property>
<child>
- <object class="GtkSpinButton" id="avatar_size">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">avatar_adjustment</property>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Export to
file</property>
+ <child>
+ <object class="GtkButton" id="avatar_save_file">
+ <property name="valign">center</property>
+ <property
name="icon_name">avatar-save-symbolic</property>
+ <signal name="clicked" swapped="yes"
handler="avatar_save_to_file_cb"/>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Export to
file</property>
- <child>
- <object class="GtkButton" id="avatar_save_file">
- <property name="valign">center</property>
- <property
name="icon_name">avatar-save-symbolic</property>
- <signal name="clicked" swapped="yes"
handler="avatar_save_to_file_cb"/>
- </object>
- </child>
+ <object class="GtkListBox" id="avatar_contacts">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="content"/>
+ </style>
</object>
</child>
</object>
- </child>
- <child>
- <object class="GtkListBox" id="avatar_contacts">
- <property name="selection-mode">none</property>
- <style>
- <class name="content"/>
- </style>
- </object>
- </child>
+ </property>
</object>
- </property>
+ </child>
</object>
- </child>
+ </property>
</object>
</property>
</object>
</property>
</object>
- </property>
- </object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="name">flap</property>
- <property name="title" translatable="yes">Flap</property>
- <property name="child">
- <object class="AdwStatusPage">
- <property name="icon-name">widget-flap-symbolic</property>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="name">flap</property>
<property name="title" translatable="yes">Flap</property>
- <property name="description" translatable="yes">A widget showing a flap next to or
above the content.</property>
<property name="child">
- <object class="GtkButton">
- <property name="label" translatable="yes">Run the demo</property>
- <property name="halign">center</property>
- <signal name="clicked" handler="flap_demo_clicked_cb" swapped="no"/>
+ <object class="AdwStatusPage">
+ <property name="icon-name">widget-flap-symbolic</property>
+ <property name="title" translatable="yes">Flap</property>
+ <property name="description" translatable="yes">A widget showing a flap next to
or above the content.</property>
+ <property name="child">
+ <object class="GtkButton">
+ <property name="label" translatable="yes">Run the demo</property>
+ <property name="halign">center</property>
+ <signal name="clicked" handler="flap_demo_clicked_cb" swapped="no"/>
+ </object>
+ </property>
</object>
</property>
</object>
- </property>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="AdwHeaderBar">
+ <property name="title-widget">
+ <object class="GtkBox"/>
+ </property>
+ <child type="start">
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="tooltip-text" translatable="yes">Back</property>
+ <property name="icon-name">go-previous-symbolic</property>
+ <signal name="clicked" handler="leaflet_back_clicked_cb"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="hscrollbar-policy">never</property>
+ <property name="vexpand">True</property>
+ <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="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>
+ <property name="pixel-size">128</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">gesture-touchpad-swipe-back-symbolic</property>
+ <property name="pixel-size">128</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -933,17 +898,11 @@
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
- <widget name="header_bar"/>
+ <widget name="left_header_bar"/>
<widget name="header_separator"/>
- <widget name="header_stack"/>
+ <widget name="right_header_bar"/>
</widgets>
</object>
- <object class="AdwSwipeGroup" id="leaflet_swipe_group">
- <swipeables>
- <swipeable name="header_leaflet"/>
- <swipeable name="content_leaflet"/>
- </swipeables>
- </object>
<object class="GtkAdjustment" id="clamp_maximum_size_adjustment">
<property name="lower">0</property>
<property name="upper">10000</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]