Gradience/data/ui/presets_manager_window.blp

173 lines
4.7 KiB
Text
Raw Normal View History

2022-08-15 13:40:21 +00:00
using Gtk 4.0;
using Adw 1;
2022-08-22 13:21:56 +00:00
template GradiencePresetWindow : Adw.Window {
title: _("Presets");
2022-09-25 19:16:33 +00:00
default-width: 700;
2022-09-26 22:03:53 +00:00
default-height: 550;
2022-08-15 13:40:21 +00:00
2022-08-22 13:21:56 +00:00
Adw.ToastOverlay toast_overlay {
Adw.Leaflet leaflet {
can-navigate-back: true;
can-unfold: false;
2022-08-15 13:40:21 +00:00
2022-08-22 13:21:56 +00:00
Gtk.Box main_view {
orientation: vertical;
2022-08-15 13:40:21 +00:00
2022-08-22 13:21:56 +00:00
Adw.HeaderBar titlebar {
centering-policy: strict;
[start]
2022-08-22 13:57:08 +00:00
Button import_button {
2022-08-22 13:21:56 +00:00
styles ["suggested-action"]
label: _("Import");
tooltip-text: _("Import a Preset File");
2022-08-23 09:46:51 +00:00
clicked => on_import_button_clicked();
2022-08-22 13:21:56 +00:00
}
2022-08-15 13:40:21 +00:00
2022-08-22 13:21:56 +00:00
[start]
2022-08-22 13:57:08 +00:00
Button remove_button {
styles ["danger"]
2022-08-22 13:21:56 +00:00
label: _("Delete");
visible: false;
}
2022-09-15 17:14:55 +00:00
2022-08-22 13:21:56 +00:00
[title]
Adw.ViewSwitcherTitle title {
stack: view_stack;
}
2022-08-15 13:40:21 +00:00
2022-08-22 13:21:56 +00:00
[end]
2022-08-22 13:57:08 +00:00
Button file_manager_button {
tooltip-text: _("Open in File Manager");
2022-08-23 08:36:20 +00:00
clicked => on_file_manager_button_clicked();
2022-08-22 13:21:56 +00:00
Adw.ButtonContent {
icon-name: "folder-symbolic";
}
}
2022-08-22 13:57:08 +00:00
2022-08-22 13:21:56 +00:00
}
2022-08-20 02:07:31 +00:00
2022-08-22 13:21:56 +00:00
Gtk.Box {
orientation: vertical;
2022-08-20 02:07:31 +00:00
2022-08-22 13:21:56 +00:00
Adw.ViewStack view_stack {
vexpand: true;
hexpand: true;
2022-08-20 02:07:31 +00:00
2022-08-22 13:21:56 +00:00
Adw.ViewStackPage {
name: "installed";
title: _("Installed");
icon-name: "larger-brush-symbolic";
2022-09-15 17:14:55 +00:00
2022-08-22 13:21:56 +00:00
child: Adw.PreferencesPage installed { };
2022-09-15 17:14:55 +00:00
2022-08-20 02:07:31 +00:00
}
2022-08-22 13:21:56 +00:00
Adw.ViewStackPage {
name: "explore";
title: _("Explore");
icon-name: "web-browser-symbolic";
2022-08-24 15:25:24 +00:00
child: Gtk.ScrolledWindow {
Adw.StatusPage {
title: _("Search for presets");
description: _("Enter a keyword to search on <a href=\"https://gradienceteam.github.io/presets\">GradienceTeam/Community</a>.");
2022-08-24 15:25:24 +00:00
valign: start;
Adw.Clamp {
styles ["clamp"]
Gtk.Box {
orientation: vertical;
2022-09-15 17:14:55 +00:00
Gtk.Box {
styles ["linked"]
2022-09-15 17:14:55 +00:00
Gtk.SearchEntry search_entry {
hexpand: true;
placeholder-text: _("e.g. \"Pretty Purple\"");
}
2022-09-15 17:14:55 +00:00
Gtk.DropDown search_dropdown {
model: StringList search_string_list {
strings [_("All")]
};
}
}
2022-08-24 15:25:24 +00:00
Gtk.Stack search_stack {
Gtk.StackPage {
name: "page_spinner";
child: Gtk.Spinner search_spinner {
2022-08-24 15:25:24 +00:00
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: Adw.StatusPage {
icon-name: "system-search-symbolic";
title: _("No Results Found");
2022-08-24 15:25:24 +00:00
};
}
2022-08-25 10:24:20 +00:00
Gtk.StackPage {
name: "page_offline";
child: Adw.StatusPage {
icon-name: "network-wireless-offline-symbolic";
title: _("Offline");
2022-08-25 10:24:20 +00:00
};
}
2022-08-24 15:25:24 +00:00
}
}
}
}
};
2022-08-15 13:40:21 +00:00
}
2022-09-03 11:02:36 +00:00
Adw.ViewStackPage {
name: "repos";
title: _("Repositories");
icon-name: "folder-symbolic";
2022-09-15 17:14:55 +00:00
2022-09-03 11:02:36 +00:00
child: Adw.PreferencesPage repos { };
2022-09-15 17:14:55 +00:00
2022-09-03 11:02:36 +00:00
}
2022-08-22 13:21:56 +00:00
}
Adw.ViewSwitcherBar {
stack: view_stack;
reveal: bind title.title-visible;
}
2022-08-15 13:40:21 +00:00
}
2022-08-22 13:21:56 +00:00
}
2022-08-15 13:40:21 +00:00
}
2022-08-22 13:21:56 +00:00
}
2022-08-20 02:07:31 +00:00
}
Gtk.FileChooserNative import_file_chooser {
title: _("Import a Preset File (*.json)");
modal: true;
}
Gtk.FileFilter all_filter {
name: _("All files");
mime-types ["application/octet-stream"]
}
Gtk.FileFilter json_filter {
name: _("JSON file (*.json)");
mime-types ["application/json"]
}