Gradience/data/ui/presets_manager_window.blp
tfuxu 4edc5f4b50 refactor: move data files (like .ui, .json or .svg) to data/ directory
* move flatpak manifests to build-aux/flatpak directory
* update workflows to new manifests locations
* update README
2022-08-28 03:48:58 +02:00

140 lines
3.9 KiB
Text

using Gtk 4.0;
using Adw 1;
template GradiencePresetWindow : Adw.Window {
title: _("Presets");
default-width: 600;
default-height: 400;
Adw.ToastOverlay toast_overlay {
Adw.Leaflet leaflet {
can-navigate-back: true;
can-unfold: false;
Gtk.Box main_view {
orientation: vertical;
Adw.HeaderBar titlebar {
centering-policy: strict;
[start]
Button import_button {
styles ["suggested-action"]
label: _("Import");
clicked => on_import_button_clicked();
}
[start]
Button remove_button {
styles ["danger"]
label: _("Delete");
visible: false;
}
[title]
Adw.ViewSwitcherTitle title {
stack: view_stack;
}
[end]
Button file_manager_button {
tooltip-text: _("Open in file manager");
clicked => on_file_manager_button_clicked();
Adw.ButtonContent {
icon-name: "folder-symbolic";
}
}
}
Gtk.Box {
orientation: vertical;
Adw.ViewStack view_stack {
vexpand: true;
hexpand: true;
Adw.ViewStackPage {
name: "installed";
title: _("Installed");
icon-name: "larger-brush-symbolic";
child: Adw.PreferencesPage installed { };
}
Adw.ViewStackPage {
name: "explore";
title: _("Explore");
icon-name: "web-browser-symbolic";
child: Gtk.ScrolledWindow {
Adw.StatusPage {
title: _("Search for presets");
description: _("Enter a keyword to search on <a href=\"https://github.com/GradienceTeam/Community\">GradienceTeam/Community</a>.");
valign: start;
Adw.Clamp {
styles ["clamp"]
Gtk.Box {
orientation: vertical;
Gtk.SearchEntry search_entry {
hexpand: true;
placeholder-text: _("e.g. \"Pretty Purple\"");
}
Gtk.Stack search_stack {
Gtk.StackPage {
name: "page_spinner";
child: Gtk.Spinner search_spinner {
valign: start;
halign: center;
spinning: true;
};
}
Gtk.StackPage {
name: "page_results";
child: Gtk.ListBox search_results {
styles ["boxed-list"]
valign: start;
selection-mode: none;
};
}
Gtk.StackPage {
name: "page_empty";
child: Gtk.Label {
label: _("No Results Found");
valign: start;
halign: center;
};
}
Gtk.StackPage {
name: "page_offline";
child: Gtk.Label {
label: _("Offline");
valign: start;
halign: center;
};
}
}
}
}
}
};
}
}
Adw.ViewSwitcherBar {
stack: view_stack;
reveal: bind title.title-visible;
}
}
}
}
}
}