mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-26 23:28:02 +03:00
178c45ae48
- added `Adw.StatusPage` to the preferences - made preparations for progress bar and launcher states system - fixed toasts resizing window issue
99 lines
3 KiB
Text
99 lines
3 KiB
Text
using Gtk 4.0;
|
|
using Adw 1;
|
|
|
|
Adw.ApplicationWindow window {
|
|
default-width: 900;
|
|
default-height: 600;
|
|
|
|
styles ["devel"]
|
|
|
|
content: Adw.ToastOverlay toast_overlay {
|
|
Adw.Leaflet leaflet {
|
|
can-navigate-back: true;
|
|
can-unfold: false;
|
|
|
|
Gtk.Box {
|
|
orientation: vertical;
|
|
hexpand: true;
|
|
|
|
Adw.HeaderBar {
|
|
title-widget: Adw.WindowTitle {
|
|
title: "An Anime Game Launcher";
|
|
};
|
|
}
|
|
|
|
Adw.PreferencesPage {
|
|
Adw.PreferencesGroup {
|
|
Gtk.Image {
|
|
file: "assets/images/icon.png";
|
|
vexpand: true;
|
|
margin-top: 48;
|
|
}
|
|
|
|
Gtk.Label {
|
|
label: "An Anime Game Launcher";
|
|
margin-top: 32;
|
|
|
|
styles ["title-1"]
|
|
}
|
|
}
|
|
|
|
Adw.PreferencesGroup launch_game_group {
|
|
vexpand: true;
|
|
valign: center;
|
|
|
|
Gtk.Box {
|
|
halign: center;
|
|
margin-top: 64;
|
|
spacing: 8;
|
|
|
|
Adw.SplitButton launch_game {
|
|
label: "Launch";
|
|
|
|
hexpand: false;
|
|
width-request: 200;
|
|
|
|
styles ["suggested-action"]
|
|
|
|
popover: Gtk.Popover {
|
|
Gtk.Button launch_game_debug {
|
|
label: "Launch in debug mode";
|
|
}
|
|
};
|
|
}
|
|
|
|
Gtk.Button open_preferences {
|
|
icon-name: "preferences-system-symbolic";
|
|
}
|
|
}
|
|
}
|
|
|
|
Adw.PreferencesGroup progress_bar_group {
|
|
vexpand: true;
|
|
valign: center;
|
|
visible: false;
|
|
|
|
Gtk.Box {
|
|
halign: center;
|
|
margin-top: 64;
|
|
spacing: 20;
|
|
|
|
Gtk.ProgressBar progress_bar {
|
|
text: "Downloading: 37% (3.7 of 10 GB)\n";
|
|
show-text: true;
|
|
|
|
width-request: 260;
|
|
fraction: 0.37;
|
|
valign: center;
|
|
}
|
|
|
|
Gtk.Button {
|
|
label: "Pause";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|