Last update: neurodifferent.me/@alexm/10997…It's been a while, so a number of things happened.
------
You've probably already seen it, since it was in the last TWIG, but @jamie added a way to create AdwAboutWindow from AppStream data. In particular, this should make release notes page far easier to work with - the release notes already support appstream markup and now it can just pull them from appdata directly rather than having to copy-paste them, and unlike application name, developer name etc they tend to be fairly long.
It doesn't unfortunately fill everything - for example, copyright line or credits still have to be specified manually since AppStream doesn't have that data in the first place. But it still considerably reduces the amount of copy-pasted information.
One part that is a bit awkward is that the appdata xml needs to be in gresource (the original plan was get the installed file by path, but it's pretty hard to do correctly in practice), and meson doesn't make easy to pull translated xmls into gresource - but it is doable.
And well, it means that libadwaita depends on libappstream now.
------
To reduce confusion a bit, @brainblasted deprecated adw_expander_row_add_action() and added adw_expander_row_add_suffix() instead - matching action rows instead. We really should have done it back in 1.0, but didn't for some reason - better late than never.
------
For sidebars, Chris also added a property that hides AdwHeaderBar title, incl. the generated one that's pulled from the window or browsing view. This should make it a lot easier to have a title in a sidebar only when folded, once the new sidebar widgets land.
------
A new contributor added AdwSwitchRow - a simple AdwActionRow subclass with a GtkSwitch. While this isn't too difficult to implement manually, it's a really common case and it gets annoying, so having a helper is nice. Another nicety is that it doesn't expose the GtkSwitch:state property, only :active - meaning it's much harder to misuse it.
------
@mks_h added a description property to AdwPreferencesPage - it looks same as preference group description, but shown at the very top of the page, making some of the Settings mockups easier to implement.
------
I finally finished and landed AdwToolbarView. We also did a few changes to toolbar styles, so you may notice the doc screenshots look a bit different now. ^^
This one I'm not announcing in TWIG yet, since the rest of the new widgetry is not there yet, so it's not as useful yet as it will be later, once the new sidebar widgets have landed.
A change that's sort of related to toolbar view, but also not really, is that the new header bar style with a shadow is now also used for GtkWindow titlebars. While we can't use it for any random header bars in a GtkBox, we can do it here. This does have a few side effects though:
- If an app is using a header bar as a window titlebar, but has, say, a GtkSearchBar within the window, the header bar shadow will be above the search bar. It's not a big problem in practice since very few apps do this (I checked every core app and every third party app I have installed and only found 2 instances), and it doesn't do much harm, just looks a bit weird - but still a thing to keep in mind.
- Late in the last cycle we changed GtkPopoverMenuBar style to use a header bar-like style as well, with the same colors and border, and a backdrop style. Well, it is quite common to use menu bars together with a header bar set as a GtkWindow titlebar as well, particularly with the automatic one GtkWindow adds by default. So, I just reverted that change and the menubars look plain and boring once again. If somebody wants them to look fancy and blend with the titlebar, AdwToolbarView does support them, so you can add a header bar and a menubar within one and it will look nice. There is even an example of that in libadwaita tests.
Alice
in reply to Alice • • •One thing to note: the original mockups positioned the number in between the - and the + buttons as follows: "- 50 +". That part was not implemented, not only because it would require poking into GtkSpinButton internals or rewriting it, but also because that really doesn't work when the displayed number has less digits than the maximum amount it's allowed to have. This means that in practice it won't look tidy like on mockups, but more like: "- 50 +".
And when you have multiple spin rows in a single list, chances are that the - buttons will be positioned differently on each row. The spring animations demo page is a good example of that happening.
On this screenshot I've right-aligned the spinbuttons (they normally extend all the way to the row title) and added a background to show this.
The - buttons would be aligned same as the backgrounds here - not good. So, they had to go.
And if you center align the numbers as well to have even spacing - well, the numbers would be misaligned too.
Alice
in reply to Alice • • •2. There's now a .property style class that can be added to AdwActionRow or AdwExpanderRow. It basically inverts the row's title and subtitle.
It's just a style class instead of a widget because having a full widget for this would be overkill, as otherwise it would be identical to action rows.
This standardizes an existing pattern - rows like this have already been used in Nautilus' and Loupe's properties. This should also be useful for apps like Contacts.
Docs: gnome.pages.gitlab.gnome.org/l…
Adw: Style Classes
gnome.pages.gitlab.gnome.org