Gradience/data/ui/window.blp

176 lines
3.7 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");
2022-08-30 17:07:30 +00:00
default-width: 1000;
default-height: 700;
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 {
2022-08-20 01:52:25 +00:00
icon-name: "applications-science-symbolic";
2022-08-20 01:35:57 +00:00
menu-model: preview-menu;
2022-08-20 01:38:52 +00:00
//label: _("Preview");
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]
2022-08-23 10:57:19 +00:00
Button presets_button {
2022-08-10 15:05:47 +00:00
label: _("Presets");
2022-08-31 11:43:57 +00:00
tooltip-text: _("Presets");
2022-08-10 15:05:47 +00:00
icon-name: "palette-symbolic";
2022-08-23 10:57:19 +00:00
clicked => on_presets_button_clicked();
2022-08-10 15:05:47 +00:00
}
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-08-10 10:17:28 +00:00
menu main-menu {
2022-08-10 10:17:28 +00:00
section {
item {
2022-09-01 13:09:34 +00:00
label: _("Restore Applied Color Scheme");
action: "app.restore_color_scheme";
}
2022-08-10 10:17:28 +00:00
item {
label: _("Reset Applied Color Scheme");
action: "app.reset_color_scheme";
}
}
section {
item {
label: _("Preferences");
action: "app.preferences";
}
2022-08-10 10:17:28 +00:00
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 {
2022-08-25 13:28:38 +00:00
label: _("Adwaita Demo");
2022-08-20 01:36:37 +00:00
action: "app.show_adwaita_demo";
2022-08-20 01:35:57 +00:00
}
2022-08-20 01:43:47 +00:00
item {
label: _("GTK4 Demo");
action: "app.show_gtk4_demo";
}
item {
label: _("GTK4 Widget Factory");
action: "app.show_gtk4_widget_factory";
}
2022-08-20 01:35:57 +00:00
}
}
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;
}
}
}