159 lines
3.5 KiB
Plaintext
159 lines
3.5 KiB
Plaintext
using Gtk 4.0;
|
|
using Adw 1;
|
|
using WebKit 6.0;
|
|
|
|
template ImaginerWindow : Adw.ApplicationWindow {
|
|
title: _("Imaginer");
|
|
default-width: 350;
|
|
default-height: 500;
|
|
|
|
ShortcutController {
|
|
Shortcut {
|
|
trigger: "<primary>q";
|
|
action: "action(window.close)";
|
|
}
|
|
}
|
|
|
|
Adw.ToastOverlay toast_overlay {
|
|
Box {
|
|
orientation: vertical;
|
|
vexpand: true;
|
|
hexpand: true;
|
|
Adw.HeaderBar {
|
|
MenuButton menu {
|
|
primary: true;
|
|
menu-model: main-menu;
|
|
icon-name: "open-menu-symbolic";
|
|
tooltip-text: _("Main Menu");
|
|
}
|
|
styles ["flat"]
|
|
}
|
|
|
|
Adw.Banner banner {
|
|
title: _("No network connection");
|
|
revealed: false;
|
|
}
|
|
|
|
Box main {
|
|
orientation: vertical;
|
|
vexpand: true;
|
|
hexpand: true;
|
|
margin-top: 0;
|
|
margin-bottom: 24;
|
|
margin-start: 24;
|
|
margin-end: 24;
|
|
spacing: 12;
|
|
|
|
Stack stack_imaginer {
|
|
transition-type: crossfade;
|
|
|
|
StackPage {
|
|
name: "stack_imagine";
|
|
child:
|
|
Adw.PreferencesPage {
|
|
Adw.PreferencesGroup {
|
|
Picture image {
|
|
halign: center;
|
|
visible: false;
|
|
styles ["card"]
|
|
//content-fit: cover;
|
|
//can-shrink: true;
|
|
height-request: 200;
|
|
width-request: 200;
|
|
|
|
}
|
|
}
|
|
|
|
Adw.PreferencesGroup {
|
|
|
|
Adw.EntryRow prompt {
|
|
title: _("Prompt");
|
|
}
|
|
|
|
Adw.EntryRow negative_prompt {
|
|
title: _("Negative Prompt");
|
|
|
|
}
|
|
}
|
|
|
|
Adw.PreferencesGroup {
|
|
title: _("Options");
|
|
|
|
Adw.ActionRow {
|
|
title: _("Save Location");
|
|
activatable-widget: button_output;
|
|
|
|
|
|
Button button_output {
|
|
valign: center;
|
|
action-name: "app.choose_output";
|
|
|
|
Box {
|
|
spacing: 6;
|
|
|
|
Image {
|
|
icon-name: "document-open-symbolic";
|
|
}
|
|
|
|
Label label_output {
|
|
label: _("(None)");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Adw.PreferencesGroup {
|
|
Button button_imagine {
|
|
valign: center;
|
|
halign: center;
|
|
label: _("_Imagine");
|
|
tooltip-text: _("Save location is missing.");
|
|
use-underline: true;
|
|
sensitive: false;
|
|
action-name: "app.ask";
|
|
|
|
styles [
|
|
"suggested-action",
|
|
"pill",
|
|
]
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
StackPage {
|
|
name: "stack_loading";
|
|
child:
|
|
Adw.StatusPage {
|
|
Spinner spinner {
|
|
valign: center;
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
menu main-menu {
|
|
section {
|
|
item {
|
|
label: _("Preferences");
|
|
action: "app.preferences";
|
|
}
|
|
|
|
item {
|
|
label: _("Keyboard Shortcuts");
|
|
action: "win.show-help-overlay";
|
|
}
|
|
|
|
item {
|
|
label: _("About Imaginer");
|
|
action: "app.about";
|
|
}
|
|
}
|
|
}
|