Skip to content
Commits on Source (103)
=============
Version 1.2.1
=============
=================
Verison 1.3.alpha
=================
- Introduce AdwBanner
- Introduce AdwTabButton and AdwTabOverview
- Fix or silence GTK 4.9.x deprecations
- Require GTK 4.9.2 and GLib 2.72.0
- Add developer name to metainfo
- AdwActionRow
- Deprecate icon-name property
- Fix spacing after removing all prefixes/suffixes
- AdwAvatar
- Correctly redraw on custom image changes
- AdwEntryRow
- Add adw_entry_row_grab_focus_without_selecting()
- Respect use-markup property
- Fix error/warning/success styles
- Fix spacing after removing all prefixes/suffixes
- AdwExpanderRow
- Add title-lines and subtitle-lines properties
- Deprecate icon-name property
- Fix spacing after removing all prefixes/suffixes
- AdwFlap
- Fix natural width with fold-policy=never
- AdwMessageDialog
- Add adw_message_dialog_choose()
- Fix focus styles in RTL
- Refactor adaptive layout
- AdwTabBar
- Add preload property and extra-drag-value signal
- Fix focus handling
- Fix autoscroll for non-local drags
- AdwTabView
- Update default tab icon
- Rewrite internals to allow overview thumbnails for inactive pages
- AdwPreferencesPage
- Add a function to scroll to top
- AdwPreferencesWindow
- Fix a memory leak
- AdwSplitButton
- Don't make dropdown insensitive when the button is
- AdwTabBar
- Fix focus handling
- Fix autoscroll for non-local drags
- AdwSpringAnimation
- Correctly mark as final
- AdwToastOverlay
- Clarify documentation
- AdwViewSwitcherBar
- Fix typos in examples
- AdwViewSwitcherTitle
- Fix typos in examples
- Demo
- Update icons
- Make tabs demo adaptive using the new widgets
- Use G_DEFINE_FINAL_TYPE where appropriate
- Doc
- Rename visual index to widget gallery
- Stop marking symbols from 1.0 as such to reduce clutter
- Stylesheet
- Fix GtkSpinButton inside toolbars
- Update for file chooser changes
- Use accent color for default list/grid selection
- Tests
- Introduce manual tests in tests/manual/
- Translation updates
- Abkhazian
- Belarusian
- British English
- Catalan
- Croatian
- Dutch
- French
- Friulian
- German
- Greek
- Hebrew
- Hindi
- Hungarian
- Indonesian
- Occitan
- Persian
- Russian
- Slovak
- Turkish
......
......@@ -8,7 +8,7 @@ struct _AdwDemoPreferencesWindow
GtkWidget *subpage2;
};
G_DEFINE_TYPE (AdwDemoPreferencesWindow, adw_demo_preferences_window, ADW_TYPE_PREFERENCES_WINDOW)
G_DEFINE_FINAL_TYPE (AdwDemoPreferencesWindow, adw_demo_preferences_window, ADW_TYPE_PREFERENCES_WINDOW)
AdwDemoPreferencesWindow *
adw_demo_preferences_window_new (void)
......
......@@ -5,6 +5,7 @@
#include "pages/about/adw-demo-page-about.h"
#include "pages/animations/adw-demo-page-animations.h"
#include "pages/avatar/adw-demo-page-avatar.h"
#include "pages/banners/adw-demo-page-banners.h"
#include "pages/buttons/adw-demo-page-buttons.h"
#include "pages/carousel/adw-demo-page-carousel.h"
#include "pages/clamp/adw-demo-page-clamp.h"
......@@ -28,7 +29,7 @@ struct _AdwDemoWindow
AdwDemoPageToasts *toasts_page;
};
G_DEFINE_TYPE (AdwDemoWindow, adw_demo_window, ADW_TYPE_APPLICATION_WINDOW)
G_DEFINE_FINAL_TYPE (AdwDemoWindow, adw_demo_window, ADW_TYPE_APPLICATION_WINDOW)
static char *
get_color_scheme_icon_name (gpointer user_data,
......@@ -119,6 +120,7 @@ adw_demo_window_init (AdwDemoWindow *self)
g_type_ensure (ADW_TYPE_DEMO_PAGE_ABOUT);
g_type_ensure (ADW_TYPE_DEMO_PAGE_ANIMATIONS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_BANNERS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_AVATAR);
g_type_ensure (ADW_TYPE_DEMO_PAGE_BUTTONS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_CAROUSEL);
......
......@@ -236,6 +236,16 @@
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="title" translatable="yes">Banner</property>
<property name="child">
<object class="AdwDemoPageBanners">
<signal name="add-toast" handler="adw_toast_overlay_add_toast" object="toast_overlay" swapped="yes"/>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
......
......@@ -37,6 +37,7 @@ show_about (GSimpleAction *action,
"Alexander Mikhaylenko",
"Andrei Lișiță",
"Guido Günther",
"Jamie Murphy",
"Julian Sparber",
"Manuel Genovés",
"Zander Brown",
......
......@@ -26,6 +26,7 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/view-sidebar-end-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/view-sidebar-end-symbolic-rtl.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-about-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-banner-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-carousel-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-clamp-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-dialog-symbolic.svg</file>
......@@ -48,6 +49,7 @@
<file preprocess="xml-stripblanks">pages/about/adw-demo-page-about.ui</file>
<file preprocess="xml-stripblanks">pages/animations/adw-demo-page-animations.ui</file>
<file preprocess="xml-stripblanks">pages/avatar/adw-demo-page-avatar.ui</file>
<file preprocess="xml-stripblanks">pages/banners/adw-demo-page-banners.ui</file>
<file preprocess="xml-stripblanks">pages/buttons/adw-demo-page-buttons.ui</file>
<file preprocess="xml-stripblanks">pages/carousel/adw-demo-page-carousel.ui</file>
<file preprocess="xml-stripblanks">pages/clamp/adw-demo-page-clamp.ui</file>
......@@ -59,6 +61,7 @@
<file preprocess="xml-stripblanks">pages/styles/adw-demo-page-styles.ui</file>
<file preprocess="xml-stripblanks">pages/styles/adw-style-demo-window.ui</file>
<file preprocess="xml-stripblanks">pages/tab-view/adw-demo-page-tab-view.ui</file>
<file preprocess="xml-stripblanks">pages/tab-view/adw-tab-view-demo-page.ui</file>
<file preprocess="xml-stripblanks">pages/tab-view/adw-tab-view-demo-window.ui</file>
<file preprocess="xml-stripblanks">pages/toasts/adw-demo-page-toasts.ui</file>
<file preprocess="xml-stripblanks">pages/view-switcher/adw-demo-page-view-switcher.ui</file>
......
......@@ -4,6 +4,7 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.1-or-later</project_license>
<launchable type="desktop-id">org.gnome.Adwaita1.Demo.desktop</launchable>
<developer_name>The GNOME Project</developer_name>
<name>Adwaita Demo</name>
<summary>Tour of the features in Libadwaita</summary>
......
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#222222">
<path d="m 0 0.972656 v 2 h 0.0117188 v 4.035156 h 13.9921872 l 0.007813 9 h 2 l -0.011719 -11.988281 c 0 -1.644531 -1.355469 -3.046875 -3 -3.046875 z m 12.457031 2.027344 c 0.828125 0 1.5 0.675781 1.5 1.507812 c 0 0.832032 -0.671875 1.503907 -1.5 1.503907 s -1.5 -0.671875 -1.5 -1.503907 c 0 -0.832031 0.671875 -1.507812 1.5 -1.507812 z m 0 0" />
<path d="m 15 12 h -14.9882812 v -5.980469 h 14.9882812 z m 0 0" fill-opacity="0.34902" />
<path d="m -0.0351562 12 v 1 h 15.0351562 v -1 z m 0 0" />
</g>
<path d="m 7 8 h 4 c 0.550781 0 1 0.449219 1 1 v 1 c 0 0.550781 -0.449219 1 -1 1 h -4 c -0.550781 0 -1 -0.449219 -1 -1 v -1 c 0 -0.550781 0.449219 -1 1 -1 z m 0 0" fill="#212121" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="15.999999"
height="15.999999"
viewBox="0 0 4.233333 4.2333332"
version="1.1"
id="svg59656"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="sound-muted-symbolic.svg">
<defs
id="defs59650" />
<sodipodi:namedview
inkscape:snap-midpoints="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-intersection-paths="true"
inkscape:object-paths="true"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.7332096"
inkscape:cx="72.365677"
inkscape:cy="-5.9069288"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid59669"
originx="-414.0729"
originy="-67.204172" />
</sodipodi:namedview>
<metadata
id="metadata59653">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-414.07291,-67.20417)">
<g
style="fill:#241f31"
transform="matrix(0.26458333,0,0,0.26458333,414.07293,67.204165)"
fill="#474747"
id="g16">
<path
transform="translate(-7.5590552e-5,1.8897638e-5)"
d="M 7.453125 2 L 4.5214844 4.9609375 L 8 8.4394531 L 8 2 L 7.453125 2 z M 11 3 L 11 5 C 11.607 5.789 12 6.76 12 8 C 12 9.241 11.607 10.22 11 11 L 11 11.439453 L 12.287109 12.726562 C 13.34008 11.684021 14 9.952001 14 8 C 14 5.834 13.261 3.98 12 3 L 11 3 z M 2 5 L 2 11 L 4.484375 11 L 7.5253906 14 L 8 14 L 8 10.5625 L 2.4375 5 L 2 5 z M 9 5 L 9 9.4394531 L 10.226562 10.666016 C 10.734406 9.9178051 11 9.0952939 11 8 C 11 6.743 10.688 5.784 10 5 L 9 5 z "
style="marker:none;fill:#241f31"
id="path10" />
</g>
<path
id="path60"
d="m 417.90147,71.336914 0.28098,-0.280987 -3.70443,-3.703902 -0.28072,0.280723 z"
style="fill:#241f31;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" />
<g
style="fill:#2ec27e"
transform="translate(-5.8208332)"
id="g72" />
</g>
</svg>
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:#2e3436" d="M8 2a1 1 0 0 0-.768.354L5 5H4c-1.108 0-2 .892-2 2v2c0 1.108.892 2 2 2h1.004l2.228 2.635a.97.97 0 0 0 .768.36Zm5.945 2.996a.985.985 0 0 0-.652.297L12 6.586l-1.293-1.293A1 1 0 0 0 10 5c-.89 0-1.337 1.077-.707 1.707L10.586 8 9.293 9.293c-.91.942.472 2.324 1.414 1.414L12 9.414l1.293 1.293c.942.91 2.324-.472 1.414-1.414L13.414 8l1.293-1.293c.711-.736.023-1.74-.762-1.71Z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#474747"><path d="M2 5h2.484l2.97-3H8v12h-.475l-3.04-3H2z" style="marker:none" color="#bebebe" overflow="visible"/><path d="M14 8c0-2.166-.739-4.02-2-5h-1v2c.607.789 1 1.76 1 3 0 1.241-.393 2.22-1 3v2h1c1.223-.995 2-2.873 2-5z" style="marker:none" color="#000" overflow="visible"/><path d="M11 8c0-1.257-.312-2.216-1-3H9v6h1c.672-.837 1-1.742 1-3z" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" color="#000" font-weight="400" font-family="Sans" overflow="visible"/></g></svg>
\ No newline at end of file
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:#2e3436;fill-opacity:1;stroke-width:1px;stroke-linejoin:miter" d="M11.04 2.004a.951.951 0 0 0-.727.281L8 4.578V6h1.39l2.305-2.299a1.017 1.017 0 0 0 .03-1.392 1.008 1.008 0 0 0-.686-.305ZM8 7v2h4c.75 0 1-.501 1-1.002 0-.5-.25-.998-1-.998Zm0 3v1.422l2.322 2.293c.405.411 1.065.346 1.414-.024a1.017 1.017 0 0 0-.03-1.392L9.39 10Z"/><path style="fill:#2e3436" d="M7 2a1 1 0 0 0-.768.354L4 5H3c-1.108 0-2 .892-2 2v2c0 1.108.892 2 2 2h1.004l2.228 2.635a.97.97 0 0 0 .768.36Z"/></svg>
\ No newline at end of file
......@@ -26,6 +26,7 @@ adwaita_demo_sources = [
'pages/about/adw-demo-page-about.c',
'pages/animations/adw-demo-page-animations.c',
'pages/avatar/adw-demo-page-avatar.c',
'pages/banners/adw-demo-page-banners.c',
'pages/buttons/adw-demo-page-buttons.c',
'pages/carousel/adw-demo-page-carousel.c',
'pages/clamp/adw-demo-page-clamp.c',
......@@ -37,6 +38,7 @@ adwaita_demo_sources = [
'pages/styles/adw-demo-page-styles.c',
'pages/styles/adw-style-demo-window.c',
'pages/tab-view/adw-demo-page-tab-view.c',
'pages/tab-view/adw-tab-view-demo-page.c',
'pages/tab-view/adw-tab-view-demo-window.c',
'pages/toasts/adw-demo-page-toasts.c',
'pages/view-switcher/adw-demo-page-view-switcher.c',
......
......@@ -7,7 +7,7 @@ struct _AdwDemoPageAbout
AdwBin parent_instance;
};
G_DEFINE_TYPE (AdwDemoPageAbout, adw_demo_page_about, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageAbout, adw_demo_page_about, ADW_TYPE_BIN)
static void
demo_run_cb (AdwDemoPageAbout *self)
......
......@@ -33,7 +33,7 @@ enum {
static GParamSpec *props[LAST_PROP];
G_DEFINE_TYPE (AdwDemoPageAnimations, adw_demo_page_animations, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageAnimations, adw_demo_page_animations, ADW_TYPE_BIN)
static AdwAnimation *
get_current_animation (AdwDemoPageAnimations *self)
......
......@@ -12,7 +12,7 @@ struct _AdwDemoPageAvatar
GtkListBox *contacts;
};
G_DEFINE_TYPE (AdwDemoPageAvatar, adw_demo_page_avatar, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageAvatar, adw_demo_page_avatar, ADW_TYPE_BIN)
static char *
create_random_name (void)
......@@ -84,12 +84,13 @@ populate_contacts (AdwDemoPageAvatar *self)
}
static void
open_response_cb (AdwDemoPageAvatar *self,
GtkResponseType response,
GtkFileChooser *chooser)
avatar_open_dialog_cb (GtkFileDialog *dialog,
GAsyncResult *result,
AdwDemoPageAvatar *self)
{
if (response == GTK_RESPONSE_ACCEPT) {
GFile *file = gtk_file_chooser_get_file (chooser);
GFile *file = gtk_file_dialog_open_finish (dialog, result, NULL);
if (file) {
GFileInfo *info;
GdkTexture *texture;
GError *error = NULL;
......@@ -117,25 +118,21 @@ open_response_cb (AdwDemoPageAvatar *self,
g_object_unref (texture);
g_object_unref (file);
}
gtk_native_dialog_destroy (GTK_NATIVE_DIALOG (chooser));
}
static void
avatar_open_cb (AdwDemoPageAvatar *self)
{
GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (self));
GtkFileChooserNative *chooser =
gtk_file_chooser_native_new (_("Select an Avatar"),
GTK_WINDOW (root),
GTK_FILE_CHOOSER_ACTION_OPEN,
_("_Select"),
_("_Cancel"));
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (chooser), TRUE);
GtkFileDialog *dialog = gtk_file_dialog_new ();
g_signal_connect_swapped (chooser, "response", G_CALLBACK (open_response_cb), self);
gtk_file_dialog_set_title (dialog, _("Select an Avatar"));
gtk_native_dialog_show (GTK_NATIVE_DIALOG (chooser));
gtk_file_dialog_open (dialog,
GTK_WINDOW (root),
NULL,
(GAsyncReadyCallback) avatar_open_dialog_cb,
self);
}
static void
......@@ -147,12 +144,13 @@ avatar_remove_cb (AdwDemoPageAvatar *self)
}
static void
save_response_cb (AdwDemoPageAvatar *self,
GtkResponseType response,
GtkFileChooser *chooser)
avatar_save_dialog_cb (GtkFileDialog *dialog,
GAsyncResult *result,
AdwDemoPageAvatar *self)
{
if (response == GTK_RESPONSE_ACCEPT) {
GFile *file = gtk_file_chooser_get_file (chooser);
GFile *file = gtk_file_dialog_save_finish (dialog, result, NULL);
if (file) {
GdkTexture *texture =
adw_avatar_draw_to_texture (self->avatar,
gtk_widget_get_scale_factor (GTK_WIDGET (self)));
......@@ -162,25 +160,21 @@ save_response_cb (AdwDemoPageAvatar *self,
g_object_unref (texture);
g_object_unref (file);
}
gtk_native_dialog_destroy (GTK_NATIVE_DIALOG (chooser));
}
static void
avatar_save_cb (AdwDemoPageAvatar *self)
{
GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (self));
GtkFileChooserNative *chooser =
gtk_file_chooser_native_new (_("Save Avatar"),
GTK_WINDOW (root),
GTK_FILE_CHOOSER_ACTION_SAVE,
_("_Save"),
_("_Cancel"));
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (chooser), TRUE);
GtkFileDialog *dialog = gtk_file_dialog_new ();
g_signal_connect_swapped (chooser, "response", G_CALLBACK (save_response_cb), self);
gtk_file_dialog_set_title (dialog, _("Save Avatar"));
gtk_native_dialog_show (GTK_NATIVE_DIALOG (chooser));
gtk_file_dialog_save (dialog,
GTK_WINDOW (root),
NULL,
(GAsyncReadyCallback) avatar_save_dialog_cb,
self);
}
static void
......
#include "adw-demo-page-banners.h"
#include <glib/gi18n.h>
struct _AdwDemoPageBanners
{
AdwBin parent_instance;
AdwBanner *banner;
AdwEntryRow *button_label_row;
};
enum {
SIGNAL_ADD_TOAST,
SIGNAL_LAST_SIGNAL,
};
static guint signals[SIGNAL_LAST_SIGNAL];
G_DEFINE_TYPE (AdwDemoPageBanners, adw_demo_page_banners, ADW_TYPE_BIN)
static void
toggle_button_cb (AdwDemoPageBanners *self)
{
if (g_strcmp0 (adw_banner_get_button_label (self->banner), "") == 0)
adw_banner_set_button_label (self->banner, gtk_editable_get_text (GTK_EDITABLE (self->button_label_row)));
else
adw_banner_set_button_label (self->banner, NULL);
}
static void
banner_activate_cb (AdwDemoPageBanners *self)
{
AdwToast *toast = adw_toast_new (_("Banner action triggered"));
g_signal_emit (self, signals[SIGNAL_ADD_TOAST], 0, toast);
}
static void
adw_demo_page_banners_class_init (AdwDemoPageBannersClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
signals[SIGNAL_ADD_TOAST] =
g_signal_new ("add-toast",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 1,
ADW_TYPE_TOAST);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/Adwaita1/Demo/ui/pages/banners/adw-demo-page-banners.ui");
gtk_widget_class_bind_template_child (widget_class, AdwDemoPageBanners, banner);
gtk_widget_class_bind_template_child (widget_class, AdwDemoPageBanners, button_label_row);
gtk_widget_class_install_action (widget_class, "demo.toggle-button", NULL, (GtkWidgetActionActivateFunc) toggle_button_cb);
gtk_widget_class_install_action (widget_class, "demo.activate", NULL, (GtkWidgetActionActivateFunc) banner_activate_cb);
}
static void
adw_demo_page_banners_init (AdwDemoPageBanners *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
}
#pragma once
#include <adwaita.h>
G_BEGIN_DECLS
#define ADW_TYPE_DEMO_PAGE_BANNERS (adw_demo_page_banners_get_type())
G_DECLARE_FINAL_TYPE (AdwDemoPageBanners, adw_demo_page_banners, ADW, DEMO_PAGE_BANNERS, AdwBin)
G_END_DECLS
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0" />
<requires lib="libadwaita" version="1.0" />
<template class="AdwDemoPageBanners" parent="AdwBin">
<property name="child">
<object class="GtkCenterBox">
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child type="start">
<object class="AdwBanner" id="banner">
<property name="revealed" bind-source="show_banner_switch" bind-property="active" bind-flags="sync-create|bidirectional" />
<property name="title" bind-source="title_row" bind-property="text" bind-flags="sync-create" />
<property name="button-label" bind-source="button_label_row" bind-property="text" bind-flags="sync-create" />
<property name="action-name">demo.activate</property>
</object>
</child>
<child type="center">
<object class="AdwStatusPage">
<property name="icon-name">widget-banner-symbolic</property>
<property name="title" translatable="yes">Banner</property>
<property name="description" translatable="yes">A bar with contextual information.</property>
<property name="child">
<object class="AdwClamp">
<property name="maximum-size">400</property>
<property name="tightening-threshold">300</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show Banner</property>
<property name="activatable_widget">show_banner_switch</property>
<child>
<object class="GtkSwitch" id="show_banner_switch">
<property name="valign">center</property>
<property name="active">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwEntryRow" id="title_row">
<property name="title" translatable="yes">Title</property>
<property name="use_underline">True</property>
<property name="text">Metered connection – updates paused</property>
</object>
</child>
<child>
<object class="AdwEntryRow" id="button_label_row">
<property name="title" translatable="yes">Button</property>
<property name="use_underline">True</property>
<property name="text">_Network Settings</property>
<property name="editable" bind-source="label_switch" bind-property="active" bind-flags="sync-create"/>
<child>
<object class="GtkSwitch" id="label_switch">
<property name="valign">center</property>
<property name="active">True</property>
<property name="action-name">demo.toggle-button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</property>
</template>
</interface>
......@@ -7,7 +7,7 @@ struct _AdwDemoPageButtons
AdwBin parent_instance;
};
G_DEFINE_TYPE (AdwDemoPageButtons, adw_demo_page_buttons, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageButtons, adw_demo_page_buttons, ADW_TYPE_BIN)
static void
adw_demo_page_buttons_class_init (AdwDemoPageButtonsClass *klass)
......
......@@ -13,7 +13,7 @@ struct _AdwDemoPageCarousel
AdwComboRow *indicators_row;
};
G_DEFINE_TYPE (AdwDemoPageCarousel, adw_demo_page_carousel, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageCarousel, adw_demo_page_carousel, ADW_TYPE_BIN)
static char *
get_orientation_name (AdwEnumListItem *item,
......
......@@ -7,7 +7,7 @@ struct _AdwDemoPageClamp
AdwBin parent_instance;
};
G_DEFINE_TYPE (AdwDemoPageClamp, adw_demo_page_clamp, ADW_TYPE_BIN)
G_DEFINE_FINAL_TYPE (AdwDemoPageClamp, adw_demo_page_clamp, ADW_TYPE_BIN)
static void
adw_demo_page_clamp_class_init (AdwDemoPageClampClass *klass)
......