Introducing Emblem ?

Emblem is a new design tool that generates project avatars, or emblems if you will, for your git forge or matrix room. To set a GitLab project avatar one can put a logo.png file at the root of the project, if there is no manually set project avatar it will be picked up automatically.

Emblem is powered by gtk4-rs, librsvg and libadwaita, you can get it at Flathub.

Special thanks to Federico Mena Quintero who helped me creating the svg template.

PS: The logo is only temporal, and a reference to Zelda OOT.

GSoC 2021 Final Report

Porting GNOME Design tools to GTK 4

As described in a previous post, the goal in this GSoC was to port Icon Library and App Icon Preview to the GTK 4 toolkit, with a corresponding port from libhandy to libadwaita.

Work Done

Both applications were successfully ported (icon-library/!16, app-icon-preview/!62). As far as we known, there is only one know regression in App Icon Preview where symbolic icons do not follow the Icon Theme, there is already a MR in place to address this.

Some additional work was done in icon-library/!17, app-icon-preview/!64, and app-icon-preview/!63; the latest MR is in the latest stages of submission and does a small refactor on how icons are loaded and cached, using a proper Icon Theme, this allows to load icons directly from their name rather than passing around images, Pixbufs or textures and enforces the Icon Theme on symbolic icons, fixing the last remaining regression.

Future Work

Now that both apps are ported, and some widgets have been subclassed, it would be easier to implement mockups, and in the case of Icon Library, implement a system to update the icons at runtime. We plan to release new versions of both apps around the release of GNOME 41.

Final Words

Working on GNOME Design tools proved to be a very positive experience which allowed me to work on two very interesting projects that will surely help fellow developers and designers.  I want to thank Bilal Elmoussaoui, who has been guiding and helping me since I joined the GNOME community.

Decoder 0.2.0 Released ?

It has been a few months since last release in February, and quite a lot has changed, GTK 4 had many issues back then and had to be manually included in the Flatpak manifest, libadwaita was still a WIP merge request for libhandy and didn’t include changes to the Adwaita stylesheet, ASHPD didn’t have an asynchronous API, and gtk4-rs was in a state of constant flux, to the point where making the required API changes when updating the app took hours, just due to the massive number of improvements in gtk-rs-core. Just updating those dependencies makes a big difference.

The worst offender was that the gstreamer plugging used for the camera depended on gstreamer/gst-plugins-good/!767 for GTK 4 support, and to make everything bad, a bug in the Intel drivers made the app crash in Wayland when initializing the camera so it had to be released without Wayland support.

On a brighter note, Bilal introduced support for the camera portal in ASHPD and made a small widget demo, this allows to drop those pesky holes in the sandbox by taking advantage of PipeWire. As far as I am aware this is the first real-world use of the camera portal, and by implementing it in Decoder, and soon in Authenticator, these of the first apps (if not the first) to use it ?. By using this we can drop the patch, stop building gstreamer and most of its modules, add back Wayland support, and drop the sandbox hole.

The plan now is to wait a few days for translations and release a 0.2.1 minor release, add support for creating more types of QR codes (I am waiting for libadwaita/!194), and incorporate this camera widget into Authenticator, and Bilal is working on releasing the Demo for ASHPD ?.

You can get Decoder at Flathub. Source at gitlab.gnome.org/World/decoder.

GSoC 2021 and GNOME Design tools

This Google School of Code, I decided to work with Bilal Elmoussaoui as a mentor, the goal being updating some GNOME design tools to GTK 4, specifically Icon Library and App Icon Preview. Both apps are written in Rust and make use of the gtk-rs bindings for gtk.

Icon Library

Icon Library is an app to preview symbolic icons in icon-development-kit. It allows to export and search icons. The process of porting Icon Library !16 was quite straightforward. The clipboard had to be adapted to the new api and the search provider had to be tweaked.

The most interesting bit was the search feature. Because of the better support for subclassing in gtk4-rs, it was natural to use list models for displaying lists, which in turn made using a filter on the model an obvious choice. But applying a filter on the list model resulted that each icon had to be redrawn on each search query, which is quite slow. The solution was to go back to setting the filter directly on the list widget.

App Icon Preview

App Icon Preview is an app for designing icons that target the GNOME environment. One complex part of porting this is app is its dependence on librsvg, which was recently updated for the latest gtk-rs. Another friction point is that widgets have moved away from using Cairo as their render and the Paintable api is not very friendly with the Clipboard or saving widgets as images. Clipboards consume`gdk::Texture` which contain metainfo, and Paintables have no methods to construct such.

After some investigation, we found a way to free the node from the render and paint it into the Cairo context used to drawn the texture.

The port !62 still has some rough edges, but it is looking promising.