Skip to content

sheet: Use custom Gtk.ListBoxRow subclasses and add/use LTR API

Niels De Graef requested to merge nielsdg/use-custom-listbox-row into main
sheet: Use custom Gtk.ListBoxRow subclasses

Rather than using `Adw.ActionRow`s, this commit splits out the
`ContactSheetRow` helper class into a separate file, and changes it to
use a GTK template UI file. An even bigger change is that it no longer
extends `AdwActionRow` but instead implements a custom `GtkListBoxRow`.

By implementing a custom row, we can add extra API that might be too
niche of a use case for `AdwActionRow` to expose, such as setting the
text direction on the title of a row.
sheet: Add API to set the text direction of a row

For some fields such as phone numbers, we want to explicitly override
the direction to LTR, even when displaying in an system that is
configured to display as RTL.

This commit adds an extra API to set the text direction of the title
label of a contact sheet row, so we can force this behavior without
messing up the subtitle (or other child widgets) of that row.
Edited by Niels De Graef

Merge request reports