mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-07-06 19:17:50 +00:00
rework ui
This commit is contained in:
parent
f064ffd831
commit
7b0e86e13c
|
@ -1,12 +1,21 @@
|
||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template AdwcustomizerMainWindow : ApplicationWindow {
|
template AdwcustomizerMainWindow : Adw.ApplicationWindow {
|
||||||
title: _("Adwaita Manager");
|
title: _("Adwaita Manager");
|
||||||
default-width: 1280;
|
default-width: 1280;
|
||||||
default-height: 720;
|
default-height: 720;
|
||||||
|
|
||||||
titlebar: HeaderBar {
|
Adw.Leaflet leaflet {
|
||||||
|
can-navigate-back: true;
|
||||||
|
can-unfold: false;
|
||||||
|
|
||||||
|
Gtk.Box main_view {
|
||||||
|
orientation: vertical;
|
||||||
|
|
||||||
|
Adw.HeaderBar titlebar {
|
||||||
|
centering-policy: strict;
|
||||||
|
|
||||||
[start]
|
[start]
|
||||||
Button apply-button {
|
Button apply-button {
|
||||||
styles ["suggested-action"]
|
styles ["suggested-action"]
|
||||||
|
@ -23,39 +32,84 @@ template AdwcustomizerMainWindow : ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [start]
|
|
||||||
// MenuButton presets-dropdown {
|
|
||||||
// icon-name: "palette-symbolic";
|
|
||||||
// menu-model: presets-menu;
|
|
||||||
// tooltip-text: _("Presets");
|
|
||||||
// }
|
|
||||||
|
|
||||||
[title]
|
[title]
|
||||||
Adw.ViewSwitcherTitle view-switcher {
|
Adw.ViewSwitcherTitle title {
|
||||||
stack: stack
|
stack: view_stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
[end]
|
[end]
|
||||||
MenuButton {
|
Gtk.MenuButton {
|
||||||
icon-name: "open-menu-symbolic";
|
icon-name: "open-menu-symbolic";
|
||||||
menu-model: main-menu;
|
menu-model: main-menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[end]
|
||||||
|
MenuButton presets-dropdown {
|
||||||
|
menu-model: presets-menu;
|
||||||
|
label: _("Presets");
|
||||||
|
icon-name: "palette-symbolic.svg";
|
||||||
|
}
|
||||||
|
|
||||||
[end]
|
[end]
|
||||||
MenuButton errors-button {
|
MenuButton errors-button {
|
||||||
styles ["raised", "error"]
|
styles ["raised", "error"]
|
||||||
icon-name: "dialog-warning-symbolic";
|
icon-name: "dialog-warning-symbolic";
|
||||||
popover: errors-popover;
|
popover: errors-popover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Gtk.Box {
|
||||||
|
orientation: vertical;
|
||||||
|
|
||||||
|
Adw.ViewStack view_stack {
|
||||||
|
vexpand: true;
|
||||||
|
hexpand: true;
|
||||||
|
|
||||||
|
Adw.ViewStackPage {
|
||||||
|
name: "colors";
|
||||||
|
title: C_("Navigation", "Colors");
|
||||||
|
icon-name: "puzzle-piece-symbolic";
|
||||||
|
|
||||||
|
child: Gtk.Label {
|
||||||
|
label: _("WIP");
|
||||||
};
|
};
|
||||||
|
|
||||||
Box {
|
}
|
||||||
Adw.ViewStack stack {
|
|
||||||
MenuButton {
|
Adw.ViewStackPage {
|
||||||
icon-name: "open-menu-symbolic";
|
name: "monet";
|
||||||
menu-model: main-menu;
|
title: C_("Navigation", "Monet");
|
||||||
|
icon-name: "globe-symbolic";
|
||||||
|
|
||||||
|
|
||||||
|
child: Gtk.Label {
|
||||||
|
label: _("WIP");
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ViewStackPage {
|
||||||
|
name: "css";
|
||||||
|
title: C_("Navigation", "CSS");
|
||||||
|
icon-name: "globe-symbolic";
|
||||||
|
|
||||||
|
|
||||||
|
child: Gtk.Label {
|
||||||
|
label: _("WIP");
|
||||||
|
};
|
||||||
|
|
||||||
|
//child: .ExmBrowsePage browse_page {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Adw.ViewSwitcherBar {
|
||||||
|
stack: view_stack;
|
||||||
|
reveal: bind title.title-visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Adw.PreferencesPage content { }
|
Adw.PreferencesPage content { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,9 +130,22 @@ menu presets-menu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
menu main-menu {
|
menu main-menu {
|
||||||
item (_("Reset Applied Color Scheme"), "app.reset_color_scheme")
|
section {
|
||||||
item (_("About Adwaita Manager"), "app.about")
|
item {
|
||||||
|
label: _("Release Notes");
|
||||||
|
action: "win.show-release-notes";
|
||||||
|
}
|
||||||
|
item {
|
||||||
|
label: _("Reset Applied Color Scheme");
|
||||||
|
action: "app.reset_color_scheme";
|
||||||
|
}
|
||||||
|
item {
|
||||||
|
label: _("About Adwaita Manager");
|
||||||
|
action: "app.about";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Popover errors-popover {
|
Popover errors-popover {
|
||||||
|
|
Loading…
Reference in a new issue