Gradience/src/ui/window.blp

176 lines
3.6 KiB
Text
Raw Normal View History

using Gtk 4.0;
using Adw 1;
2022-08-19 19:14:05 +00:00
template GradienceMainWindow : Adw.ApplicationWindow {
title: _("Gradience");
default-width: 1280;
default-height: 720;
2022-08-10 15:05:47 +00:00
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 apply-button {
styles ["suggested-action"]
label: _("Apply");
action-name: "app.apply_color_scheme";
}
2022-08-20 00:07:33 +00:00
[start]
2022-08-20 01:35:57 +00:00
Gtk.MenuButton {
icon-name: "open-menu-symbolic";
menu-model: preview-menu;
2022-08-20 00:07:33 +00:00
}
2022-08-10 15:05:47 +00:00
[title]
Adw.ViewSwitcherTitle title {
stack: view_stack;
}
2022-08-12 09:30:51 +00:00
[end]
Gtk.MenuButton {
icon-name: "open-menu-symbolic";
menu-model: main-menu;
}
2022-08-10 15:05:47 +00:00
[end]
MenuButton presets-dropdown {
menu-model: presets-menu;
label: _("Presets");
icon-name: "palette-symbolic";
}
2022-08-10 09:30:32 +00:00
2022-08-10 15:05:47 +00:00
[end]
Button save-preset-button {
action-name: "app.save_preset";
tooltip-text: _("Save Preset");
Adw.ButtonContent {
icon-name: "drive-symbolic";
2022-08-10 15:05:47 +00:00
}
}
2022-08-10 13:07:25 +00:00
2022-08-10 15:05:47 +00:00
[end]
MenuButton errors-button {
styles ["raised", "error"]
icon-name: "dialog-warning-symbolic";
popover: errors-popover;
2022-08-10 10:17:28 +00:00
}
2022-08-11 17:27:47 +00:00
2022-07-18 19:20:02 +00:00
2022-08-10 10:17:28 +00:00
}
2022-08-10 15:05:47 +00:00
Gtk.Box {
orientation: vertical;
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
Adw.ViewStack view_stack {
vexpand: true;
hexpand: true;
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
Adw.ViewStackPage {
name: "colors";
2022-08-19 18:23:30 +00:00
title: _("Colors");
2022-08-10 15:05:47 +00:00
icon-name: "larger-brush-symbolic";
child: Adw.PreferencesPage content { };
}
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
Adw.ViewStackPage {
name: "monet";
2022-08-19 18:23:30 +00:00
title: _("Monet");
2022-08-10 15:05:47 +00:00
icon-name: "color-picker-symbolic";
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
child: Adw.PreferencesPage content_monet { };
}
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
Adw.ViewStackPage {
name: "plugins";
2022-08-19 18:23:30 +00:00
title: _("Advanced");
2022-08-10 15:05:47 +00:00
icon-name: "settings-symbolic";
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
child: Adw.PreferencesPage content_plugins { };
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
}
}
2022-08-10 10:17:28 +00:00
2022-08-10 15:05:47 +00:00
Adw.ViewSwitcherBar {
stack: view_stack;
reveal: bind title.title-visible;
}
}
}
}
2022-08-10 09:30:32 +00:00
}
}
2022-07-18 11:27:31 +00:00
menu presets-menu {
section {
label: _("Built-in Presets");
item {
2022-08-14 18:14:55 +00:00
label: _("Adwaita");
action: "app.load_preset";
target: "adwaita";
}
item {
2022-08-14 18:14:55 +00:00
label: _("Adwaita Dark");
action: "app.load_preset";
target: "adwaita-dark";
}
2022-08-10 12:47:17 +00:00
item {
2022-08-14 18:14:55 +00:00
label: _("Manage Presets");
2022-08-10 12:47:17 +00:00
action: "app.manage_presets";
}
}
}
2022-08-10 10:17:28 +00:00
menu main-menu {
2022-08-10 10:17:28 +00:00
section {
item {
label: _("Reset Applied Color Scheme");
action: "app.reset_color_scheme";
}
item {
label: _("About Gradience");
2022-08-10 10:17:28 +00:00
action: "app.about";
}
}
2022-07-18 19:20:02 +00:00
}
2022-08-20 01:35:57 +00:00
menu preview-menu {
section {
item {
label: _("Try Adwaita Demo");
action: "app.show_adwaita_demo"
}
}
}
2022-07-18 19:20:02 +00:00
Popover errors-popover {
ListBox errors-list {
selection-mode: none;
[placeholder]
Label {
margin-top: 6;
margin-bottom: 6;
margin-start: 12;
margin-end: 12;
halign: start;
styles ["dim-label"]
max-width-chars: 50;
wrap: true;
justify: left;
}
}
}