• Pl chevron_right

      Alice Mikhaylenko: Libadwaita 1.10

      news.movim.eu / PlanetGnome • 1 day ago • 3 minutes

    Screenshot of libadwaita demo, GTK Inspector and Crosswords

    Not a lot of things have landed this cycle, but there's still a bit to list, so let's do that.

    Android support

    As part of his effort to port GTK to Android, Florian also ported libadwaita demo. The builds are available from CI and the GTK 4 Android page.

    Screenshot of libadwaita demo running on Android

    He also implemented a settings backend, meaning that libadwaita apps now support system dark mode and accent color on Android (not high contrast or document/monospace fonts though).

    Ministream

    AdwAboutDialog can be populated from an AppStream metainfo file, via libappstream. While useful, it also causes problems on other platforms, such as Windows (libappstream can't be built using msvc) or Android, due to its dependencies.

    Since we only use a small part of appstream (for example, we don't need composing or anything related to networking), he reimplemented the subset libadwaita uses as ministream. It only depends on GLib and it should build fine with msvc, so it should make building libadwaita outside of Linux easier.

    CSS class bindings

    A fairly common pattern is having property that toggles a style class - e.g. for use with breakpoints. Currently implementing it is a bit annoying, so Jamie Murphy added API for automating it - adw_bind_property_to_css_class().

    It's modeled after g_object_bind_property() and works much the same way, incl. allowing bidirectional bindings.

    A variant with mapping functions is also available, allowing to bind properties of arbitrary types and not just booleans.

    Sidebar additions

    AdwSidebar and AdwViewSwitcherSidebar have received a number of additions.

    Sidebar prefix and suffix

    First, both sidebar widgets now support having prefix and suffix widgets. This can be used for things like adding an account switcher, a prominent title, or a help button at the bottom. While it's not used a lot in GNOME apps at the moment (the only app I'm aware of is a development version of Crosswords), it's a common pattern on other platforms, so it's good to have API for this.

    Section suffix

    Next, sections can have suffixes in their headers, similar to AdwPreferencesGroup. This can be used to put a spinner or a button in the sidebar sections, similar to what Polari has.

    Screenshot of a sidebar where one of its sections has a plus button in the header

    Item prefix

    Finally, sidebar items can have prefix widgets. They can be used instead of the icon or together with it, in that case it will be displayed before it. This can be used to display avatars, checkboxes and so on.

    Icon changes

    Last cycle I announced the new icon work. Unfortunately, it's still not ready, but a few smaller things have landed. First, larger icon sizes now use smaller weight, so new icons in AdwStatusPage and in images with the icon-size (but not pixel-size!) property set to LARGEwill look thinner.

    Second, AdwSpinner now also follows icon weight and will look consistent with icons. Apps that use spinners at large sizes outside of AdwStatusPage may have to adjust the weight manually using the -gtk-icon-weight CSS property.

    Screenshot of libadwaita demo, showing an icon with smaller weight in its status page

    Other changes

    • AdwShortcutLabel now uses proper labels for keys like ⌘ or ⌥ on macOS, as well as more natural ordering for modifiers everywhere.

    • GtkDropDown can now be used with the .flat style class, and automatically becomes flat in toolbars (which can be undone with the .raised style class, same as for other buttons)

      Screenshot of the CSS page in GTK inspector with flat dropdowns
    • AdwAboutDialog now has the :other-apps-title property, allowing to override the title of the "Other Apps" section.


    Overall, not a lot has happened. Even this blog post is late, for the first time.

    Part of the reason is various health issues, both physical and mental, another part is the state of the world at large and software industry in particular. It's hard to focus at the best of times, let alone when everything is falling apart.

    I've been working on a personal project as a means of escapism, but it does mean libadwaita is getting less attention.


    Thanks to the GNOME Foundation for their support and thanks to all the contributors who made this release possible.