feat: Set activatable widget on action rows
Some checks failed
Build / Flatpak (x86_64) (push) Failing after 1h11m29s
Some checks failed
Build / Flatpak (x86_64) (push) Failing after 1h11m29s
And add tooltips
This commit is contained in:
@@ -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)
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user