The release of the Libadwaita 1.0 library for creating GNOME-style interfaces

The GNOME project has released the first stable version of the Libadwaita library, which includes a set of components for styling the user interface in accordance with the GNOME HIG (Human Interface Guidelines). The library contains ready-made widgets and objects for building applications that align with the overall GNOME style, with interfaces that can adapt to screens of any size. The library's code is written in C and is distributed under the LGPL 2.1+ license.

The release of the Libadwaita 1.0 library for creating GNOME-style interfaces

The libadwaita library is used in conjunction with GTK4 and includes components from the Adwaita theme used in GNOME, which have been extracted from GTK into a separate library. The libadwaita code is based on the libhandy library and is positioned as a successor to this library, which was originally created for building adaptive interfaces on mobile platforms using GNOME technologies, and was refined in the GNOME Phosh environment for the Librem 5 smartphone.

The library includes standard widgets that cover various interface elements such as lists, panels, editing blocks, buttons, tabs, search forms, dialog windows, etc. The proposed widgets allow for the creation of versatile interfaces that function seamlessly on both large PC and laptop screens and small touchscreens of smartphones. The user interface of applications dynamically adapts based on the screen size and available input devices. The library also includes a set of Adwaita styles that align appearances with GNOME guidelines, eliminating the need for manual adaptation.

Extracting the visual elements of GNOME into a separate library allows for the necessary changes for GNOME to be developed separately from GTK, enabling GTK developers to focus on the core aspects while allowing GNOME developers to quickly and flexibly promote the changes they need in styling without affecting GTK itself. However, this approach also creates challenges for developers of third-party user environments based on GTK, who must either use libadwaita and adapt to GNOME's features and replicate its styling, or develop their own style library for GTK, accepting that GNOME applications will look inconsistent in environments based on third-party style libraries.

Third-party environment developers primarily express dissatisfaction regarding issues with overriding the colors of interface elements, but libadwaita developers are working on providing an API for flexible color management, which will be included in one of the upcoming releases. Unresolved issues also include the proper functioning of gesture control widgets only on touch screens — for touchpads, proper widget functionality will be ensured later, as it requires changes to GTK.

Key changes in libadwaita compared to libhandy:

  • A completely revamped set of styles. The Adwaita theme used in GNOME has been extracted from GTK and modernized, while the old theme has been fixed in GTK under the name "Default." One of the most noticeable differences between libadwaita and the "Default" theme is the redesign of window title bars.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • The mechanisms for binding colors to elements and changing colors during application runtime have been altered (issues arise because libadwaita has switched to SCSS, which requires rebuilding to change colors). To change the colors of elements, as needed in GNOME Web for marking the transition to incognito mode, a method suggested in elementary OS has been applied, which is based on defining a fixed list of named colors through "@define-color." Many interface element colors are now calculated relative to the base text color and change automatically, limiting applications' control over the color scheme (developers are working to eliminate this limitation).
    The release of the Libadwaita 1.0 library for creating GNOME-style interfacesThe release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • The quality of display when using dark themes has been improved through more contrasting highlighting of elements. The accent color has been made brighter, and an additional highlighting color has been added that can vary for dark and light themes.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfacesThe release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • A substantial number of new style classes have been added for use in applications. For example, ".pill" for large rounded buttons, the ability to use ".flat" in GtkHeaderBar, ".accent" for accent color in labels, ".numeric" for tabular typography, and ".card" for using background and shadow in lists.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • Large monolithic SCSS files have been split into a collection of smaller style files.
  • An API has been added for configuring dark themes and high contrast modes.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • The documentation has been overhauled, now generated using the gi-docgen toolkit.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • An API for animation has been added, which can be used to create transition effects when swapping from one state to another, as well as to create spring animations.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • For tabs based on AdwViewSwitcher, the ability to display labels with the number of unread notifications has been added.
    The release of the Libadwaita 1.0 library for creating GNOME-style interfaces
  • The AdwApplication class (a subclass of GtkApplication) has been added for the automatic initialization of Libadwaita and the loading of styles.
  • A collection of widgets has been added to simplify standard operations: AdwWindowTitle for setting window titles, AdwBin for simplifying the creation of child subclasses, AdwSplitButton for combined buttons, and AdwButtonContent for buttons with icons and labels.
  • The API has been cleaned up.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster