diff --git a/data/resources/ui/widgets/language_row.blp b/data/resources/ui/widgets/language_row.blp index 57317ef..7da3569 100644 --- a/data/resources/ui/widgets/language_row.blp +++ b/data/resources/ui/widgets/language_row.blp @@ -1,26 +1,12 @@ using Gtk 4.0; +using Adw 1; -template LanguageRow : ListBoxRow { +template LanguageRow : .AdwActionRow { + activatable: true; focusable: true; selectable: false; - child: - Box { - margin-start: 12; - margin-end: 12; - margin-top: 6; - margin-bottom: 6; - spacing: 18; - [center] - Label label { - hexpand: true; - wrap: true; - ellipsize: end; - lines: 2; - } - - Image { - icon-name: "go-next-symbolic"; - } - }; + Image { + icon-name: "go-next-symbolic"; + } } diff --git a/src/ui/widgets.py b/src/ui/widgets.py index cbd103f..bf6c0ea 100644 --- a/src/ui/widgets.py +++ b/src/ui/widgets.py @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later -from gi.repository import Gtk +from gi.repository import Adw, Gtk @Gtk.Template(resource_path='/com/github/p3732/os-installer/ui/widgets/device_row.ui') @@ -49,16 +49,14 @@ class DeviceRow(Gtk.ListBoxRow): @Gtk.Template(resource_path='/com/github/p3732/os-installer/ui/widgets/language_row.ui') -class LanguageRow(Gtk.ListBoxRow): +class LanguageRow(Adw.ActionRow): __gtype_name__ = 'LanguageRow' - label = Gtk.Template.Child() - def __init__(self, info, **kwargs): super().__init__(**kwargs) self.info = info - self.label.set_label(info.name) + self.set_title(info.name) @Gtk.Template(resource_path='/com/github/p3732/os-installer/ui/widgets/no_partitions_row.ui')