feat: Set activatable widget on action rows
Some checks failed
Build / Flatpak (x86_64) (push) Failing after 1h11m29s

And add tooltips
This commit is contained in:
daudix-UFO
2023-07-24 01:48:43 +03:00
parent ec0597f4f1
commit 85a7742ac5
3 changed files with 6 additions and 2 deletions

View File

@@ -51,11 +51,11 @@ class PreferencesWindow(Adw.PreferencesWindow):
self.model_group.add(p)
else:
self.no_models_available = Adw.ExpanderRow()
self.no_models_available.set_title(_("Download more models"))
self.no_models_available.set_title(_("List of available models"))
for model in GPT4All.list_models():
self.no_models_available.add_row(DownloadRow(self.app, self, model))
self.model_group.add(self.no_models_available)
self.general_page.add(self.model_group)
self.general_page.add(self.model_group)

View File

@@ -2,11 +2,13 @@ using Gtk 4.0;
using Adw 1;
template $DownloadRow : Adw.ActionRow {
activatable-widget: download;
[suffix]
Button download {
styles ["flat"]
valign: center;
icon-name: "folder-download-symbolic";
tooltip-text: _("Download Model");
clicked => $on_download_button_clicked();
}
}

View File

@@ -2,11 +2,13 @@ using Gtk 4.0;
using Adw 1;
template $Model : Adw.ActionRow {
activatable-widget: delete_button;
[suffix]
Button delete_button {
styles ["flat"]
valign: center;
icon-name: "user-trash-symbolic";
tooltip-text: _("Delete Model");
clicked => $on_delete_button_clicked();
}
}