Imaginer/data/ui/window.blp
0xMRTT 95f706c047
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix: remove translation of the filename (#9)
2023-05-27 22:56:28 +02:00

218 lines
5.5 KiB
Text

using Gtk 4.0;
using Adw 1;
template $ImaginerWindow : Adw.ApplicationWindow {
title: _("Imaginer");
default-width: 350;
default-height: 500;
width-request: 250;
// height-request: 400;
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;
}
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;
margin-start: 12;
margin-end: 12;
height-request: 200;
width-request: 200;
}
}
Adw.PreferencesGroup {
margin-start: 12;
margin-end: 12;
Adw.EntryRow prompt {
title: _("Prompt");
}
Adw.EntryRow negative_prompt {
title: _("Negative Prompt");
[suffix]
MenuButton negative_help {
icon-name: "help-about-symbolic";
valign: center;
tooltip-text: _("About Negative Prompt");
styles [ "flat" ]
popover: Popover {
autohide: true;
Label negative-label {
margin-top: 6;
margin-bottom: 6;
margin-start: 6;
margin-end: 6;
max-width-chars: 30;
wrap: true;
justify: center;
label: _("Negative Prompt is a way to specify what you don't want to see in the image, without any extra input");
}
};
}
}
// Adw.ActionRow image_size {
// title: _("Image Size");
// Gtk.Box {
// orientation: horizontal;
// spacing: 4;
// valign: center;
// Gtk.SpinButton image_width_spinbutton {
// tooltip-text: _("Image Width");
// adjustment: Gtk.Adjustment image_width_adjustment {
// lower: 1;
// upper: 8192;
// step-increment: 1;
// page-increment: 5;
// };
// value-changed => on_image_width_changed();
// }
// Gtk.SpinButton image_height_spinbutton {
// tooltip-text: _("Image Height");
// adjustment: Gtk.Adjustment image_height_adjustment {
// lower: 1;
// upper: 8192;
// step-increment: 1;
// page-increment: 5;
// };
// value-changed => on_image_height_changed();
// }
// }
// }
}
Adw.PreferencesGroup {
title: _("Options");
margin-start: 12;
margin-end: 12;
Adw.EntryRow filename_prompt {
title: _("Filename");
text: "imaginer-%d-%b-%Y";
}
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");
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: _("New window");
action: "app.new";
}
item {
label: _("About Imaginer");
action: "app.about";
}
}
}