Skip to content
Commits on Source (167)
......@@ -56,6 +56,7 @@ abi-check:
- ./.gitlab-ci/check-abi ${LAST_ABI_BREAK} $(git rev-parse HEAD)
refresh-doc:
image: fedora
stage: publish
only:
refs:
......
......@@ -67,7 +67,7 @@ def build_install(revision):
subprocess.check_call(['meson', build_dir,
'--prefix=/usr', '--libdir=lib',
'-Db_coverage=false', '-Dgtkdoc=false', '-Dtests=false'])
'-Db_coverage=false', '-Dgtk_doc=false', '-Dtests=false'])
subprocess.check_call(['ninja', '-v', '-C', build_dir])
subprocess.check_call(['ninja', '-v', '-C', build_dir, 'install'],
env={'DESTDIR': dest_dir})
......
=============
Version 1.1.2
=============
=================
Version 1.2.alpha
=================
- Introduce AdwAboutWindow
- Introduce AdwEntryRow and AdwPasswordEntryRow
- Introduce AdwMessageDialog
- Introduce AdwPropertyAnimationTarget
- AdwAnimation
- Add adw_animation_set_target()
- AdwCallbackAnimationTarget
- Fix callback annotations
- AdwActionRow
- Set a11y relations for the activatable widget
- Tweak spacing to match toolbars and AdwEntryRow
- AdwAvatar
- Fix initials not updating after setting custom-image
- AdwComboRow
- Add an example to docs
- AdwExpanderRow
- Change arrow orientation to make it look less similar
to action rows that open subpages
- AdwLeaflet
- Fix child sizing with fold-threshold-policy=natural
- Clip child during transitions, preventing glitchy header bar borders
- Check direction argument in navigate()
- Fix a broken link in docs
- AdwPreferencesGroup
- Fix accessibility labels
- Annotation fixes
- AdwPreferencesRow
- Add use-markup property
- Annotation fixes
- AdwSplitButton
- Avoid state changes during dispose
- AdwStyleManager
- Fix high contrast setting name when using a portal
- Correctly handle removing a GdkDisplay
- Add environment variables to control styles from Builder
- AdwSwipeTracker
- Fix a memory leak
- Fix high contrast setting name when using a portal
- AdwTabBar
- Ensure indicators are clickable with inverted=true
- Fix resize deferring with non-expanded tabs
- Fix scroll animation stopping too early
- Fix middle click when inside GtkWindowHandle
- Refresh style
- Use a button-like style for tabs, ensure visibility in dark variant
- Add spacing between and around tabs and action widgets
- Use real widgets for separators instead of borders
- Replace shade gradients with opacity fading
- Replace needs-attention glow with a line
- Add backdrop style matching header bars
- Use :selected state for selected tab instead of :checked
- AdwToast
- Add custom-title property
- Add adw_toast_new_format()
- Allow dismiss() to be called multiple times
- Fix the example in docs
- AdwToastOverlay
- Allow add_toast() to be called multiple times to extend the timeout
- Make toasts without button narrower
- AdwViewSwitcherTitle
- Clear pending idle callback on unrealize
- Stylesheet
- Fix action row title and subtitle inside GtkHeaderBar
- Fix progressbar.osd overriding text color
- Deprecate the .large-title style class
- Add @dialog_bg_color and @dialog_fg_color for AdwMessageDialog
- Add backdrop styles for GtkSearchBar and GtkActionBar
- Update GtkColorScale style, following GTK
- Add missing borders in high contrast version
- Style GtkActionBar like header bars and similar widgets
- Use shade colors as borders for header bars and similar widgets
- Use shade colors as boxed list rows borders
- Remove border from leaflet/flap transition shadow
- Slightly tone down window outline
- Dim GtkPlacesSidebar unmount buttons to match icons
- Ensure active states consistently work with touchscreens
- Make GtkComboBox and GtkDropDown less likely to stretch vertically
- Fix GtkDropDown visual glitch when pressed on touchscreen
- Translation updates:
- Chinese (Taiwan)
- Nepali
=============
Version 1.1.1
=============
- AdwAvatar
- Fix initials not updating after setting custom-image
- AdwSplitButton:
- Avoid state changes during dispose
- AdwViewSwitcherTitle
- Clear pending idle callback on unrealize
- AdwPreferencesGroup
- Annotation fixes
- AdwPreferencesGroup
- Annotation fixes
- AdwTabBar
- Ensure indicators are clickable with inverted=true
- Fix resize deferring with non-expanded tabs
- Fix scroll animation stopping too early
- Mention AdwComboRow:selected type in migration guide
- Fix progressbar.osd overriding text color
- Fix action row title and subtitle inside GtkHeaderBar
- Docs
- Mention AdwComboRow:selected type in migration guide
- Update *_shade color descriptions
- Make screenshot tool buildable with MSVC
- Disable animations before taking screenshots
- Remove property nicks and blurbs
- Make property flags consistent
- Fix symbols added in 1.1 being erroneously marked as 1.0
- Fix a Meson error when using as a subproject
- Translation updates:
- Abkhazian
- Various internal changes and cleanups
Translation updates:
- Basque
- Brazilian Portuguese
- British English
- Bulgarian
- Catalan
- Chinese (China)
- Chinese (Taiwan)
- Dutch
- French
- Galician
- Georgian
- German
- Hebrew
- Lithuanian
- Nepali
- Persian
- Portuguese
- Russian
- Spanish
- Swedish
- Turkish
- Ukrainian
=============
Version 1.1.0
......
#include "config.h"
#include "adw-demo-debug-info.h"
/* Copied and adapted from gtk/inspector/general.c */
static void
get_gtk_info (const char **backend,
const char **renderer)
{
GdkDisplay *display = gdk_display_get_default ();
GdkSurface *surface;
GskRenderer *gsk_renderer;
if (!g_strcmp0 (G_OBJECT_TYPE_NAME (display), "GdkX11Display"))
*backend = "X11";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (display), "GdkWaylandDisplay"))
*backend = "Wayland";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (display), "GdkBroadwayDisplay"))
*backend = "Broadway";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (display), "GdkWin32Display"))
*backend = "Windows";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (display), "GdkMacosDisplay"))
*backend = "macOS";
else
*backend = G_OBJECT_TYPE_NAME (display);
surface = gdk_surface_new_toplevel (display);
gsk_renderer = gsk_renderer_new_for_surface (surface);
if (!g_strcmp0 (G_OBJECT_TYPE_NAME (gsk_renderer), "GskVulkanRenderer"))
*renderer = "Vulkan";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (gsk_renderer), "GskGLRenderer"))
*renderer = "GL";
else if (!g_strcmp0 (G_OBJECT_TYPE_NAME (gsk_renderer), "GskCairoRenderer"))
*renderer = "Cairo";
else
*renderer = G_OBJECT_TYPE_NAME (gsk_renderer);
gsk_renderer_unrealize (gsk_renderer);
g_object_unref (gsk_renderer);
gdk_surface_destroy (surface);
}
#ifndef G_OS_WIN32
static char *
get_flatpak_info (const char *group,
const char *key)
{
GKeyFile *keyfile = g_key_file_new ();
char *ret = NULL;
if (g_key_file_load_from_file (keyfile, "/.flatpak-info", 0, NULL))
ret = g_key_file_get_string (keyfile, group, key, NULL);
g_key_file_unref (keyfile);
return ret;
}
#endif
char *
adw_demo_generate_debug_info (void)
{
GString *string = g_string_new (NULL);
#ifndef G_OS_WIN32
gboolean flatpak = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
#endif
g_string_append_printf (string, "Libadwaita demo: %s (%s)\n", ADW_VERSION_S,
ADW_DEMO_VCS_TAG);
g_string_append (string, "\n");
g_string_append (string, "Compiled against:\n");
g_string_append_printf (string, "- GLib: %d.%d.%d\n", GLIB_MAJOR_VERSION,
GLIB_MINOR_VERSION,
GLIB_MICRO_VERSION);
g_string_append_printf (string, "- GTK: %d.%d.%d\n", GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION);
g_string_append (string, "\n");
g_string_append (string, "Running against:\n");
g_string_append_printf (string, "- GLib: %d.%d.%d\n", glib_major_version,
glib_minor_version,
glib_micro_version);
g_string_append_printf (string, "- GTK: %d.%d.%d\n", gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ());
g_string_append (string, "\n");
{
char *os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
char *os_version = g_get_os_info (G_OS_INFO_KEY_VERSION);
g_string_append (string, "System:\n");
g_string_append_printf (string, "- Name: %s\n", os_name);
g_string_append_printf (string, "- Version: %s\n", os_version);
g_string_append (string, "\n");
g_free (os_name);
g_free (os_version);
}
{
const char *backend, *renderer;
get_gtk_info (&backend, &renderer);
g_string_append (string, "GTK:\n");
g_string_append_printf (string, "- GDK backend: %s\n", backend);
g_string_append_printf (string, "- GSK renderer: %s\n", renderer);
g_string_append (string, "\n");
}
#ifndef G_OS_WIN32
if (flatpak) {
char *runtime = get_flatpak_info ("Application", "runtime");
char *runtime_commit = get_flatpak_info ("Instance", "runtime-commit");
char *arch = get_flatpak_info ("Instance", "arch");
char *flatpak_version = get_flatpak_info ("Instance", "flatpak-version");
char *devel = get_flatpak_info ("Instance", "devel");
g_string_append (string, "Flatpak:\n");
g_string_append_printf (string, "- Runtime: %s\n", runtime);
g_string_append_printf (string, "- Runtime commit: %s\n", runtime_commit);
g_string_append_printf (string, "- Arch: %s\n", arch);
g_string_append_printf (string, "- Flatpak version: %s\n", flatpak_version);
g_string_append_printf (string, "- Devel: %s\n", devel ? "yes" : "no");
g_string_append (string, "\n");
g_free (runtime);
g_free (runtime_commit);
g_free (arch);
g_free (flatpak_version);
g_free (devel);
}
#endif
{
const char *desktop = g_getenv ("XDG_CURRENT_DESKTOP");
const char *session_desktop = g_getenv ("XDG_SESSION_DESKTOP");
const char *session_type = g_getenv ("XDG_SESSION_TYPE");
const char *lang = g_getenv ("LANG");
const char *builder = g_getenv ("INSIDE_GNOME_BUILDER");
const char *gtk_debug = g_getenv ("GTK_DEBUG");
const char *gtk_theme = g_getenv ("GTK_THEME");
const char *adw_debug_color_scheme = g_getenv ("ADW_DEBUG_COLOR_SCHEME");
const char *adw_debug_high_contrast = g_getenv ("ADW_DEBUG_HIGH_CONTRAST");
const char *adw_disable_portal = g_getenv ("ADW_DISABLE_PORTAL");
g_string_append (string, "Environment:\n");
g_string_append_printf (string, "- Desktop: %s\n", desktop);
g_string_append_printf (string, "- Session: %s (%s)\n", session_desktop,
session_type);
g_string_append_printf (string, "- Language: %s\n", lang);
g_string_append_printf (string, "- Running inside Builder: %s\n", builder ? "yes" : "no");
if (gtk_debug)
g_string_append_printf (string, "- GTK_DEBUG: %s\n", gtk_debug);
if (gtk_theme)
g_string_append_printf (string, "- GTK_THEME: %s\n", gtk_theme);
if (adw_debug_color_scheme)
g_string_append_printf (string, "- ADW_DEBUG_COLOR_SCHEME: %s\n", adw_debug_color_scheme);
if (adw_debug_high_contrast)
g_string_append_printf (string, "- ADW_DEBUG_HIGH_CONTRAST: %s\n", adw_debug_high_contrast);
if (adw_disable_portal)
g_string_append_printf (string, "- ADW_DISABLE_PORTAL: %s\n", adw_disable_portal);
}
return g_string_free (string, FALSE);
}
#pragma once
#include <adwaita.h>
G_BEGIN_DECLS
char *adw_demo_generate_debug_info (void);
G_END_DECLS
......@@ -2,11 +2,13 @@
#include <glib/gi18n.h>
#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/buttons/adw-demo-page-buttons.h"
#include "pages/carousel/adw-demo-page-carousel.h"
#include "pages/clamp/adw-demo-page-clamp.h"
#include "pages/dialogs/adw-demo-page-dialogs.h"
#include "pages/flap/adw-demo-page-flap.h"
#include "pages/leaflet/adw-demo-page-leaflet.h"
#include "pages/lists/adw-demo-page-lists.h"
......@@ -115,11 +117,13 @@ adw_demo_window_init (AdwDemoWindow *self)
{
AdwStyleManager *manager = adw_style_manager_get_default ();
g_type_ensure (ADW_TYPE_DEMO_PAGE_ABOUT);
g_type_ensure (ADW_TYPE_DEMO_PAGE_ANIMATIONS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_AVATAR);
g_type_ensure (ADW_TYPE_DEMO_PAGE_BUTTONS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_CAROUSEL);
g_type_ensure (ADW_TYPE_DEMO_PAGE_CLAMP);
g_type_ensure (ADW_TYPE_DEMO_PAGE_DIALOGS);
g_type_ensure (ADW_TYPE_DEMO_PAGE_FLAP);
g_type_ensure (ADW_TYPE_DEMO_PAGE_LEAFLET);
g_type_ensure (ADW_TYPE_DEMO_PAGE_LISTS);
......
......@@ -138,7 +138,9 @@
<object class="GtkStackPage">
<property name="title" translatable="yes">Lists</property>
<property name="child">
<object class="AdwDemoPageLists"/>
<object class="AdwDemoPageLists">
<signal name="add-toast" handler="adw_toast_overlay_add_toast" object="toast_overlay" swapped="yes"/>
</object>
</property>
</object>
</child>
......@@ -216,6 +218,24 @@
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="title" translatable="yes">Dialogs</property>
<property name="child">
<object class="AdwDemoPageDialogs">
<signal name="add-toast" handler="adw_toast_overlay_add_toast" object="toast_overlay" swapped="yes"/>
</object>
</property>
</object>
</child>
<child>
<object class="GtkStackPage">
<property name="title" translatable="yes">About Window</property>
<property name="child">
<object class="AdwDemoPageAbout"/>
</property>
</object>
</child>
</object>
</child>
</object>
......
......@@ -2,6 +2,7 @@
#include <gtk/gtk.h>
#include <adwaita.h>
#include "adw-demo-debug-info.h"
#include "adw-demo-preferences-window.h"
#include "adw-demo-window.h"
......@@ -31,7 +32,7 @@ show_about (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
const char *authors[] = {
const char *developers[] = {
"Adrien Plazas",
"Alexander Mikhaylenko",
"Andrei Lișiță",
......@@ -42,38 +43,47 @@ show_about (GSimpleAction *action,
NULL
};
const char *artists[] = {
const char *designers[] = {
"GNOME Design Team",
NULL
};
};
GtkApplication *app = GTK_APPLICATION (user_data);
GtkWindow *window = gtk_application_get_active_window (app);
char *version;
version = g_strdup_printf ("%s\nRunning against libadwaita %d.%d.%d, GTK %d.%d.%d",
ADW_VERSION_S,
adw_get_major_version (),
adw_get_minor_version (),
adw_get_micro_version (),
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ());
gtk_show_about_dialog (window,
"program-name", _("Adwaita Demo"),
"title", _("About Adwaita Demo"),
"logo-icon-name", "org.gnome.Adwaita1.Demo",
"version", version,
"copyright", "Copyright © 2017–2021 Purism SPC",
"comments", _("Tour of the features in Libadwaita"),
"website", "https://gitlab.gnome.org/GNOME/libadwaita",
"license-type", GTK_LICENSE_LGPL_2_1,
"authors", authors,
"artists", artists,
"translator-credits", _("translator-credits"),
NULL);
g_free (version);
char *debug_info;
GtkWidget *about;
debug_info = adw_demo_generate_debug_info ();
about =
g_object_new (ADW_TYPE_ABOUT_WINDOW,
"transient-for", window,
"application-icon", "org.gnome.Adwaita1.Demo",
"application-name", _("Adwaita Demo"),
"developer-name", _("The GNOME Project"),
"version", ADW_VERSION_S,
"website", "https://gitlab.gnome.org/GNOME/libadwaita",
"issue-url", "https://gitlab.gnome.org/GNOME/libadwaita/-/issues/new",
"debug-info", debug_info,
"debug-info-filename", "adwaita-1-demo-debug-info.txt",
"copyright", "© 2017–2022 Purism SPC",
"license-type", GTK_LICENSE_LGPL_2_1,
"developers", developers,
"designers", designers,
"artists", designers,
"translator-credits", _("translator-credits"),
NULL);
adw_about_window_add_link (ADW_ABOUT_WINDOW (about),
_("_Documentation"),
"https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/");
adw_about_window_add_link (ADW_ABOUT_WINDOW (about),
_("_Chat"),
"https://matrix.to/#/#libadwaita:gnome.org");
gtk_window_present (GTK_WINDOW (about));
g_free (debug_info);
}
static void
......
......@@ -25,8 +25,10 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/view-sidebar-start-symbolic-rtl.svg</file>
<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-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>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-flap-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-leaflet-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-list-symbolic.svg</file>
......@@ -34,6 +36,7 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-toast-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/widget-view-switcher-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/apps/org.gnome.Boxes.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/apps/org.example.Typeset.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/status/dark-mode-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/status/light-mode-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/status/tab-audio-playing-symbolic.svg</file>
......@@ -42,11 +45,13 @@
<file compressed="true">style-dark.css</file>
</gresource>
<gresource prefix="/org/gnome/Adwaita1/Demo/ui">
<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/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>
<file preprocess="xml-stripblanks">pages/dialogs/adw-demo-page-dialogs.ui</file>
<file preprocess="xml-stripblanks">pages/flap/adw-demo-page-flap.ui</file>
<file preprocess="xml-stripblanks">pages/flap/adw-flap-demo-window.ui</file>
<file preprocess="xml-stripblanks">pages/leaflet/adw-demo-page-leaflet.ui</file>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 8 0 c -4.410156 0 -8 3.589844 -8 8 s 3.589844 8 8 8 s 8 -3.589844 8 -8 s -3.589844 -8 -8 -8 z m 0 2 c 3.332031 0 6 2.667969 6 6 s -2.667969 6 -6 6 s -6 -2.667969 -6 -6 s 2.667969 -6 6 -6 z m 0 1.875 c -0.621094 0 -1.125 0.503906 -1.125 1.125 s 0.503906 1.125 1.125 1.125 s 1.125 -0.503906 1.125 -1.125 s -0.503906 -1.125 -1.125 -1.125 z m -1.523438 3.125 c -0.265624 0.011719 -0.476562 0.230469 -0.476562 0.5 c 0 0.277344 0.222656 0.5 0.5 0.5 h 0.5 v 3 h -0.5 c -0.277344 0 -0.5 0.222656 -0.5 0.5 s 0.222656 0.5 0.5 0.5 h 3 c 0.277344 0 0.5 -0.222656 0.5 -0.5 s -0.222656 -0.5 -0.5 -0.5 h -0.5 v -4 h -2.5 c -0.007812 0 -0.015625 0 -0.023438 0 z m 0 0" fill="#2e3436"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#222222"><path d="m 2 1.007812 c -0.550781 0 -1 0.449219 -1 1 v 1.984376 h 2 v -0.984376 h 9 v 0.992188 h 2 v -1.992188 c 0 -0.550781 -0.449219 -1 -1 -1 z m 10 12 v 0.992188 h -9 v -0.984375 h -2 v 1.984375 c 0 0.550781 0.449219 1 1 1 h 11 c 0.550781 0 1 -0.449219 1 -1 v -1.992188 z m 0 0" fill-opacity="0.34902"/><path d="m 4 4 c -0.550781 0 -1 0.449219 -1 1 v 7.007812 c 0 0.550782 0.449219 1 1 1 h 7 c 0.550781 0 1 -0.449218 1 -1 v -7.007812 c 0 -0.550781 -0.449219 -1 -1 -1 z m 0 2 h 7 v 3.992188 h -7 z m 0 4.992188 h 3 v 1.007812 h -3 z m 4 0 h 3 v 1.007812 h -3 z m 0 0"/></g></svg>
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#63452c"/><stop offset=".038" stop-color="#865e3c"/><stop offset=".077" stop-color="#63452c"/><stop offset=".923" stop-color="#63452c"/><stop offset=".962" stop-color="#865e3c"/><stop offset="1" stop-color="#63452c"/></linearGradient><linearGradient id="d" gradientTransform="matrix(.23214 0 0 .20395 -8.567 207.653)" x1="88.596" x2="536.596" xlink:href="#a" y1="-449.394" y2="-449.394"/><linearGradient id="e" gradientUnits="userSpaceOnUse" x1="30" x2="104" y1="84" y2="98"><stop offset="0" stop-color="#deddda"/><stop offset="1" stop-color="#c0bfbc"/></linearGradient><linearGradient id="f" gradientTransform="matrix(.23214 0 0 .125 -8.567 146.174)" x1="88.596" x2="536.596" xlink:href="#a" y1="-449.394" y2="-449.394"/><linearGradient id="g" gradientTransform="matrix(.23214 0 0 .20395 -8.567 207.653)" gradientUnits="userSpaceOnUse" x1="88.596" x2="536.596" y1="-449.394" y2="-449.394"><stop offset="0" stop-color="#3d3846"/><stop offset=".038" stop-color="#77767b"/><stop offset=".077" stop-color="#3d3846"/><stop offset=".923" stop-color="#3d3846"/><stop offset=".962" stop-color="#77767b"/><stop offset="1" stop-color="#3d3846"/></linearGradient><linearGradient id="h" gradientUnits="userSpaceOnUse" x1="30" x2="104" y1="88" y2="102"><stop offset="0" stop-color="#f6f5f4"/><stop offset="1" stop-color="#deddda"/></linearGradient><filter id="b" height="100%" width="100%" x="0%" y="0%"><feColorMatrix in="SourceGraphic" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><mask id="j"><g filter="url(#b)"><path fill-opacity=".4" d="M0 0h128v128H0z"/></g></mask><clipPath id="i"><path d="M0 0h192v152H0z"/></clipPath><mask id="l"><g filter="url(#b)"><path fill-opacity=".2" d="M0 0h128v128H0z"/></g></mask><clipPath id="k"><path d="M0 0h192v152H0z"/></clipPath><clipPath id="m"><path d="M12 76h104v8H12zm0 0"/></clipPath><mask id="o"><g filter="url(#b)"><path fill-opacity=".2" d="M0 0h128v128H0z"/></g></mask><clipPath id="n"><path d="M0 0h192v152H0z"/></clipPath><linearGradient id="p" gradientTransform="matrix(.25 0 0 .125 -14.149 136.174)" gradientUnits="userSpaceOnUse" x1="88.596" x2="536.596" y1="-449.394" y2="-449.394"><stop offset="0" stop-color="#1a5fb4"/><stop offset=".038" stop-color="#3584e4"/><stop offset=".077" stop-color="#1a5fb4"/><stop offset=".923" stop-color="#1a5fb4"/><stop offset=".962" stop-color="#3584e4"/><stop offset="1" stop-color="#1a5fb4"/></linearGradient><linearGradient id="q" gradientTransform="rotate(60 83.053 209)" gradientUnits="userSpaceOnUse" x1="61" x2="67" y1="220" y2="220"><stop offset="0" stop-color="#5e5c64"/><stop offset=".5" stop-color="#9a9996"/><stop offset="1" stop-color="#3d3846"/></linearGradient><linearGradient id="r" gradientTransform="matrix(2.66662 0 0 -2.66662 -106.664 -514.657)" gradientUnits="userSpaceOnUse" x1="58" x2="70" y1="-211" y2="-211"><stop offset="0" stop-color="#77767b"/><stop offset=".5" stop-color="#9a9996"/><stop offset="1" stop-color="#77767b"/></linearGradient><linearGradient id="s" gradientUnits="userSpaceOnUse" x1="58" x2="70" y1="39.5" y2="39.5"><stop offset="0" stop-color="#5e5c64"/><stop offset=".5" stop-color="#c0bfbc"/><stop offset="1" stop-color="#3d3846"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#77767b"/><stop offset=".5" stop-color="#c0bfbc"/><stop offset="1" stop-color="#77767b"/></linearGradient><linearGradient id="t" gradientTransform="matrix(1.99998 0 0 -1.99998 -63.998 -393.995)" x1="58" x2="70" xlink:href="#c" y1="-211" y2="-211"/><radialGradient id="u" cx="-194.837" cy="-64" gradientTransform="matrix(0 -.7747 -.7747 0 14.42 -130.439)" gradientUnits="userSpaceOnUse" r="8"><stop offset="0" stop-color="#deddda"/><stop offset="1" stop-color="#77767b"/></radialGradient><linearGradient id="v" gradientTransform="rotate(60 83.053 209)" x1="61" x2="67" xlink:href="#c" y1="220" y2="220"/><path d="M20 54h88a8 8 0 0 1 8 8v46a8 8 0 0 1-8 8H20a8 8 0 0 1-8-8V62a8 8 0 0 1 8-8zm0 0" fill="url(#d)"/><path d="M20 54h88v46H20zm0 0" fill="url(#e)"/><path d="M20 28h88v66H20zm0 0" fill="#f6f5f4"/><path d="M20 52h88a8 8 0 0 1 8 8v22a8 8 0 0 1-8 8H20a8 8 0 0 1-8-8V60a8 8 0 0 1 8-8zm0 0" fill="url(#f)"/><path d="M20 54h88a8 8 0 0 1 8 8v46a8 8 0 0 1-8 8H20a8 8 0 0 1-8-8V62a8 8 0 0 1 8-8zm0 0" fill="url(#g)"/><path d="M21.453 52h85.094c5.219 0 9.453 3.582 9.453 8v44c0 4.418-4.234 8-9.453 8H21.453c-5.219 0-9.453-3.582-9.453-8V60c0-4.418 4.234-8 9.453-8zm0 0" fill="#5e5c64"/><path d="M20 58h88v46H20zm0 0" fill="url(#h)"/><g fill-opacity=".137"><path d="M108 102h-.5v1h.5zm-44.508 0 44 1v-1zm0 0"/><path d="M108 102h-.5v1h.5zm-44.508 0 44 1v-1zM108 100h-.5v1h.5zm-47.508 0 47 1v-1zM108 98h-.5v1h.5zm-50.508 0 50 1v-1zm0 0"/><path d="M20 96h88v8H20zm0 0"/></g><g clip-path="url(#i)" mask="url(#j)" transform="translate(-8 -16)"><path d="M34 94h4v14h-4zm0 0" fill="#241f31"/></g><g clip-path="url(#k)" fill="#241f31" mask="url(#l)" transform="translate(-8 -16)"><path d="M48.535 99H58v9h-9.465zm0 0"/><path d="M44 94h10v14H44zM64 94h18v14H64zm0 0"/><path d="M80 102h6v6h-6zM92 94h6v14h-6zm0 0"/></g><g clip-path="url(#m)"><g clip-path="url(#n)" mask="url(#o)" transform="translate(-8 -16)"><path d="M25.453 44h93.094c5.219 0 9.453 3.582 9.453 8v40c0 4.418-4.234 8-9.453 8H25.453C20.234 100 16 96.418 16 92V52c0-4.418 4.234-8 9.453-8zm0 0"/></g></g><path d="M16 42h96a8 8 0 0 1 8 8v22a8 8 0 0 1-8 8H16a8 8 0 0 1-8-8V50a8 8 0 0 1 8-8zm0 0" fill="url(#p)"/><path d="M17.453 20h93.094c5.219 0 9.453 3.582 9.453 8v40c0 4.418-4.234 8-9.453 8H17.453C12.234 76 8 72.418 8 68V28c0-4.418 4.234-8 9.453-8zm0 0" fill="#3584e4"/><path d="m32.824 216 62.352-36" fill="none" stroke="url(#q)" stroke-linecap="round" stroke-width="6" transform="translate(0 -172)"/><path d="M80 48c0-8.836-7.164-16-16-16s-16 7.164-16 16 7.164 16 16 16 16-7.164 16-16zm0 0" fill="url(#r)"/><path d="M64 30c-8.836 0-16 7.164-16 16s7.164 16 16 16 16-7.164 16-16-7.164-16-16-16zm0 0" fill="#deddda"/><path d="m59 27-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1 2-1 2v1a5.998 5.998 0 0 0 9 5.195c1.855-1.07 3-3.05 3-5.195v-3l-1-2 1-2-1-2 1-2-1-2 1-2-1-2 1-2-1-2zm0 0" fill="url(#s)"/><path d="M69 29s-1.352 3.656-4.91 4.016C60.527 33.375 59 31 59 31l-1 2s2.094 2.781 6.09 2.55c3.996-.234 5.785-4.51 5.91-4.55zm0 0" fill="#fff" fill-opacity=".38"/><path d="M70 31c-.125.04-1.914 4.316-5.91 4.55C60.094 35.782 58 33 58 33l1 2s1.527 2.375 5.09 2.016C67.648 36.656 69 33 69 33l.043.086zm0 0" fill="#241f31" fill-opacity=".337"/><path d="M69 37s-1.352 3.656-4.91 4.016C60.527 41.375 59 39 59 39l-1 2s2.094 2.781 6.09 2.55c3.996-.234 5.785-4.51 5.91-4.55zm0 0" fill="#fff" fill-opacity=".38"/><path d="M69 41s-1.441 3.656-5 4.016S59 43 59 43l-1 2s2.004 2.781 6 2.55c3.996-.234 5.875-4.51 6-4.55zM69 33s-1.352 3.656-4.91 4.016C60.527 37.375 59 35 59 35l-1 2s2.094 2.781 6.09 2.55c3.996-.234 5.785-4.51 5.91-4.55zm0 0" fill="#fff" fill-opacity=".38"/><path d="M70 39c-.125.04-1.914 4.316-5.91 4.55S58 41 58 41l1 2s1.527 2.375 5.09 2.016C67.648 44.656 69 41 69 41l.043.086zm0 0" fill="#241f31" fill-opacity=".337"/><path d="M70 35c-.125.04-1.914 4.316-5.91 4.55C60.094 39.782 58 37 58 37l1 2s1.527 2.375 5.09 2.016C67.648 40.656 69 37 69 37l.043.086zm0 0" fill="#241f31" fill-opacity=".337"/><path d="M76 28c0-6.629-5.371-12-12-12s-12 5.371-12 12 5.371 12 12 12 12-5.371 12-12zm0 0" fill="url(#t)"/><path d="M64 10c-6.629 0-12 5.371-12 12s5.371 12 12 12 12-5.371 12-12-5.371-12-12-12zm0 0" fill="#deddda"/><path d="M52.023 27.406c-.015.2-.02.395-.023.594 0 6.629 5.371 12 12 12s12-5.371 12-12c-.004-.137-.012-.27-.02-.406C75.664 33.98 70.395 38.996 64 39c-6.465-.008-11.758-5.133-11.977-11.594zm0 0" fill="#77767b"/><path d="M64 16c-3.313 0-6 2.688-6 6s2.688 6 6 6 6-2.688 6-6-2.688-6-6-6zm0 0" fill="url(#u)"/><path d="M32.824 216 52.41 204.69" fill="#77767b" stroke="url(#v)" stroke-linecap="round" stroke-width="6" transform="translate(0 -172)"/><path d="M32.824 216 52.41 204.69" fill="#77767b" stroke="url(#q)" stroke-linecap="round" stroke-width="6" transform="translate(0 -172)"/></svg>
\ No newline at end of file
......@@ -2,6 +2,17 @@ if get_option('examples')
subdir('data')
demo_config_data = configuration_data()
demo_config_data.set_quoted('ADW_DEMO_VCS_TAG', '@VCS_TAG@')
demo_config_h = vcs_tag(
input: configure_file(
output: 'config.h.in',
configuration: demo_config_data
),
output: 'config.h'
)
adwaita_demo_resources = gnome.compile_resources(
'adwaita-demo-resources',
'adwaita-demo.gresources.xml',
......@@ -12,11 +23,13 @@ adwaita_demo_resources = gnome.compile_resources(
adwaita_demo_sources = [
adwaita_demo_resources,
'pages/about/adw-demo-page-about.c',
'pages/animations/adw-demo-page-animations.c',
'pages/avatar/adw-demo-page-avatar.c',
'pages/buttons/adw-demo-page-buttons.c',
'pages/carousel/adw-demo-page-carousel.c',
'pages/clamp/adw-demo-page-clamp.c',
'pages/dialogs/adw-demo-page-dialogs.c',
'pages/flap/adw-demo-page-flap.c',
'pages/flap/adw-flap-demo-window.c',
'pages/leaflet/adw-demo-page-leaflet.c',
......@@ -31,8 +44,10 @@ adwaita_demo_sources = [
'pages/welcome/adw-demo-page-welcome.c',
'adwaita-demo.c',
'adw-demo-debug-info.c',
'adw-demo-preferences-window.c',
'adw-demo-window.c',
demo_config_h,
libadwaita_generated_headers,
]
......
#include "adw-demo-page-about.h"
#include <glib/gi18n.h>
struct _AdwDemoPageAbout
{
AdwBin parent_instance;
};
G_DEFINE_TYPE (AdwDemoPageAbout, adw_demo_page_about, ADW_TYPE_BIN)
static void
demo_run_cb (AdwDemoPageAbout *self)
{
GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (self));
GtkWidget *about;
const char *developers[] = {
"Angela Avery <angela@example.org>",
NULL
};
const char *artists[] = {
"GNOME Design Team",
NULL
};
const char *special_thanks[] = {
"My cat",
NULL
};
const char *release_notes = "\
<p>\
This release adds the following features:\
</p>\
<ul>\
<li>Added a way to export fonts.</li>\
<li>Better support for <code>monospace</code> fonts.</li>\
<li>Added a way to preview <em>italic</em> text.</li>\
<li>Bug fixes and performance improvements.</li>\
<li>Translation updates.</li>\
</ul>\
";
about =
g_object_new (ADW_TYPE_ABOUT_WINDOW,
"transient-for", root,
"application-icon", "org.example.Typeset",
"application-name", _("Typeset"),
"developer-name", _("Angela Avery"),
"version", "1.2.3",
"release-notes-version", "1.2.0",
"release-notes", release_notes,
"comments", _("Typeset is an app that doesn’t exist and is used as an example content for this about window."),
"website", "https://example.org",
"issue-url", "https://example.org",
"support-url", "https://example.org",
"copyright", "© 2022 Angela Avery",
"license-type", GTK_LICENSE_LGPL_2_1,
"developers", developers,
"artists", artists,
"translator-credits", _("translator-credits"),
NULL);
adw_about_window_add_link (ADW_ABOUT_WINDOW (about),
_("_Documentation"),
"https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.AboutWindow.html");
adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about),
_("Fonts"),
NULL,
GTK_LICENSE_CUSTOM,
"This application uses font data from <a href='https://example.org'>somewhere</a>.");
adw_about_window_add_acknowledgement_section (ADW_ABOUT_WINDOW (about),
_("Special thanks to"),
special_thanks);
gtk_window_present (GTK_WINDOW (about));
gtk_window_present (GTK_WINDOW (about));
}
static void
adw_demo_page_about_class_init (AdwDemoPageAboutClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Adwaita1/Demo/ui/pages/about/adw-demo-page-about.ui");
gtk_widget_class_install_action (widget_class, "demo.run", NULL, (GtkWidgetActionActivateFunc) demo_run_cb);
}
static void
adw_demo_page_about_init (AdwDemoPageAbout *self)
{
gtk_widget_init_template (GTK_WIDGET (self));
}
#pragma once
#include <adwaita.h>
G_BEGIN_DECLS
#define ADW_TYPE_DEMO_PAGE_ABOUT (adw_demo_page_about_get_type())
G_DECLARE_FINAL_TYPE (AdwDemoPageAbout, adw_demo_page_about, ADW, DEMO_PAGE_ABOUT, 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="AdwDemoPageAbout" parent="AdwBin">
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">widget-about-symbolic</property>
<property name="title" translatable="yes">About Window</property>
<property name="description" translatable="yes">An about window.</property>
<property name="child">
<object class="GtkButton">
<property name="label" translatable="yes">Run Demo</property>
<property name="halign">center</property>
<property name="action-name">demo.run</property>
<style>
<class name="pill"/>
</style>
</object>
</property>
</object>
</property>
</template>
</interface>
......@@ -306,18 +306,14 @@ adw_demo_page_animations_class_init (AdwDemoPageAnimationsClass *klass)
object_class->get_property = adw_demo_page_animations_get_property;
props[PROP_TIMED_ANIMATION] =
g_param_spec_object ("timed-animation",
"Timed animation",
"Timed animation",
g_param_spec_object ("timed-animation", NULL, NULL,
ADW_TYPE_ANIMATION,
G_PARAM_READWRITE);
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
props[PROP_SPRING_ANIMATION] =
g_param_spec_object ("spring-animation",
"Spring animation",
"Spring animation",
g_param_spec_object ("spring-animation", NULL, NULL,
ADW_TYPE_ANIMATION,
G_PARAM_READWRITE);
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, props);
......
......@@ -7,7 +7,7 @@ struct _AdwDemoPageAvatar
AdwBin parent_instance;
AdwAvatar *avatar;
GtkEntry *text;
AdwEntryRow *text;
GtkLabel *file_chooser_label;
GtkListBox *contacts;
};
......
......@@ -66,13 +66,8 @@
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<object class="AdwEntryRow" id="text">
<property name="title" translatable="yes">Text</property>
<child>
<object class="GtkEntry" id="text">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
......