Imaginer/data/ui/window.blp

218 lines
5.5 KiB
Plaintext
Raw Normal View History

2023-04-26 18:22:27 +05:30
using Gtk 4.0;
using Adw 1;
2023-05-14 20:40:53 +05:30
template $ImaginerWindow : Adw.ApplicationWindow {
title: _("Imaginer");
2023-04-27 05:41:40 +05:30
default-width: 350;
default-height: 500;
width-request: 250;
// height-request: 400;
2023-04-27 04:02:45 +05:30
2023-04-26 18:22:27 +05:30
ShortcutController {
Shortcut {
trigger: "<primary>q";
action: "action(window.close)";
}
}
Adw.ToastOverlay toast_overlay {
2023-04-27 04:02:45 +05:30
Box {
orientation: vertical;
vexpand: true;
hexpand: true;
Adw.HeaderBar {
MenuButton menu {
2023-04-27 04:02:45 +05:30
primary: true;
menu-model: main-menu;
icon-name: "open-menu-symbolic";
tooltip-text: _("Main Menu");
}
2023-04-27 05:41:40 +05:30
styles ["flat"]
2023-04-27 04:02:45 +05:30
}
2023-04-26 18:22:27 +05:30
2023-04-27 17:54:21 +05:30
Adw.Banner banner {
title: _("No network connection");
2023-04-27 17:54:21 +05:30
revealed: false;
}
2023-05-13 03:37:21 +05:30
Stack stack_imaginer {
transition-type: crossfade;
2023-04-26 18:22:27 +05:30
2023-05-13 03:37:21 +05:30
StackPage {
name: "stack_imagine";
child:
Adw.PreferencesPage {
Adw.PreferencesGroup {
2023-05-13 03:37:21 +05:30
Picture image {
halign: center;
visible: false;
styles ["card"]
//content-fit: cover;
//can-shrink: true;
2023-05-13 08:14:15 +05:30
margin-start: 12;
margin-end: 12;
2023-05-13 03:37:21 +05:30
height-request: 200;
width-request: 200;
2023-04-27 17:54:21 +05:30
}
2023-04-27 17:17:31 +05:30
}
2023-04-26 18:22:27 +05:30
2023-05-13 03:37:21 +05:30
Adw.PreferencesGroup {
2023-05-13 08:14:15 +05:30
margin-start: 12;
margin-end: 12;
2023-05-13 03:37:21 +05:30
Adw.EntryRow prompt {
title: _("Prompt");
}
2023-04-27 17:54:21 +05:30
2023-05-13 03:37:21 +05:30
Adw.EntryRow negative_prompt {
title: _("Negative Prompt");
[suffix]
MenuButton negative_help {
icon-name: "help-about-symbolic";
valign: center;
tooltip-text: _("About Negative Prompt");
2023-05-13 04:45:50 +05:30
styles [ "flat" ]
2023-05-18 23:10:45 +05:30
popover: Popover {
2023-05-18 23:10:45 +05:30
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");
}
};
2023-05-18 23:10:45 +05:30
}
2023-05-13 03:37:21 +05:30
}
2023-05-23 01:19:35 +05:30
2023-05-26 21:12:14 +05:30
// 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();
// }
// }
// }
2023-05-13 03:37:21 +05:30
}
2023-05-13 03:37:21 +05:30
Adw.PreferencesGroup {
title: _("Options");
2023-05-13 08:14:15 +05:30
margin-start: 12;
margin-end: 12;
2023-05-26 21:12:14 +05:30
Adw.EntryRow filename_prompt {
title: _("Filename");
text: "imaginer-%d-%b-%Y";
2023-05-26 21:12:14 +05:30
}
2023-05-13 03:37:21 +05:30
Adw.ActionRow {
title: _("Save Location");
activatable-widget: button_output;
2023-05-13 03:37:21 +05:30
Button button_output {
valign: center;
action-name: "app.choose_output";
Box {
spacing: 6;
Image {
icon-name: "document-open-symbolic";
}
2023-04-27 17:54:21 +05:30
2023-05-13 03:37:21 +05:30
Label label_output {
label: _("(None)");
}
}
}
2023-04-27 04:02:45 +05:30
}
2023-05-13 03:37:21 +05:30
}
2023-05-11 03:59:16 +05:30
2023-05-13 03:37:21 +05:30
Adw.PreferencesGroup {
Button button_imagine {
valign: center;
halign: center;
label: _("_Imagine");
use-underline: true;
sensitive: false;
action-name: "app.ask";
styles [
"suggested-action",
"pill",
]
2023-05-11 03:59:16 +05:30
}
2023-05-13 03:37:21 +05:30
}
};
}
StackPage {
name: "stack_loading";
child:
Adw.StatusPage {
Spinner spinner {
valign: center;
2023-04-26 18:22:27 +05:30
}
};
2023-04-26 18:22:27 +05:30
}
}
}
}
}
2023-05-13 03:37:21 +05:30
2023-04-26 18:22:27 +05:30
menu main-menu {
section {
item {
label: _("Preferences");
action: "app.preferences";
}
2023-04-27 18:26:28 +05:30
item {
label: _("Keyboard Shortcuts");
action: "win.show-help-overlay";
}
item {
label: _("New window");
action: "app.new";
}
2023-04-26 18:22:27 +05:30
item {
label: _("About Imaginer");
2023-04-26 18:22:27 +05:30
action: "app.about";
}
}
}