Add project files

This commit is contained in:
kra-mo
2022-12-26 14:38:37 +01:00
parent e90a79778c
commit f5c1012628
39 changed files with 2588 additions and 0 deletions

109
src/gtk/game.blp Normal file
View File

@@ -0,0 +1,109 @@
using Gtk 4.0;
using Adw 1;
template game : Box {
orientation: vertical;
halign: center;
valign: start;
Button cover_button {
Picture cover {
width-request: 200;
height-request: 300;
hexpand: true;
vexpand: true;
styles [
"card",
]
}
styles [
"card",
"flat",
]
}
Adw.Clamp {
maximum-size: 200;
Box {
Label title {
label: _("Title");
ellipsize: end;
hexpand: true;
halign: start;
margin-start: 12;
}
MenuButton menu_button {
icon-name: "view-more-symbolic";
margin-top: 6;
margin-bottom: 6;
margin-end: 6;
margin-start: 6;
menu-model: game_options;
styles [
"flat",
]
}
}
}
styles [
"card",
]
}
menu game_options {
section {
item {
label: _("Play");
action: "app.launch_game";
}
}
section {
item {
label: _("Edit");
action: "app.edit_details";
}
item {
label: _("Hide");
action: "app.hide_game";
}
item {
label: _("Remove");
action: "app.remove_game";
}
}
}
menu hidden_game_options {
section {
item {
label: _("Play");
action: "app.launch_game";
}
}
section {
item {
label: _("Edit");
action: "app.edit_details";
}
item {
label: _("Unhide");
action: "app.hide_game";
}
item {
label: _("Remove");
action: "app.remove_game";
}
}
}

34
src/gtk/help-overlay.blp Normal file
View File

@@ -0,0 +1,34 @@
using Gtk 4.0;
ShortcutsWindow help_overlay {
modal: true;
ShortcutsSection {
section-name: "shortcuts";
max-height: 10;
ShortcutsGroup {
title: C_("shortcut window", "General");
ShortcutsShortcut {
title: C_("shortcut window", "Quit");
action-name: "app.quit";
}
ShortcutsShortcut {
title: C_("shortcut window", "Search");
action-name: "win.toggle_search";
}
ShortcutsShortcut {
title: C_("shortcut window", "Shortcuts");
action-name: "win.show-help-overlay";
}
ShortcutsShortcut {
title: C_("shortcut window", "Undo");
action-name: "win.undo_remove";
}
}
}
}

35
src/gtk/preferences.blp Normal file
View File

@@ -0,0 +1,35 @@
using Gtk 4.0;
using Adw 1;
template PreferencesWindow : Adw.PreferencesWindow {
search-enabled: false;
default-height: 400;
Adw.PreferencesPage {
Adw.PreferencesGroup {
title: _("General");
Adw.ActionRow {
title: _("Exit after launching a game");
Switch exit_after_launch_switch {
valign: center;
}
}
}
Adw.PreferencesGroup {
title: "Steam";
Adw.ActionRow {
title: _("Steam install location");
subtitle: _("Directory to use when importing games");
Button steam_file_chooser_button {
icon-name: "folder-symbolic";
valign: center;
}
}
}
}
}