games: Load cover art

This commit is contained in:
kramo
2025-11-29 11:20:34 +01:00
parent 958558d1b6
commit af6c424207
5 changed files with 72 additions and 17 deletions

View File

@@ -3,8 +3,8 @@ using Adw 1;
template $Window: Adw.ApplicationWindow {
title: _("Cartridges");
default-width: 800;
default-height: 600;
default-width: 920;
default-height: 700;
ShortcutController {
Shortcut {
@@ -28,18 +28,43 @@ template $Window: Adw.ApplicationWindow {
}
}
content: GridView {
model: NoSelection {
model: bind template.games;
};
content: ScrolledWindow {
child: GridView {
name: "grid";
factory: BuilderListItemFactory {
template ListItem {
child: Label {
label: bind template.item as <$Game>.name;
};
}
model: NoSelection {
model: bind template.games;
};
factory: BuilderListItemFactory {
template ListItem {
child: Box {
orientation: vertical;
spacing: 12;
Picture {
paintable: bind template.item as <$Game>.cover;
width-request: 200;
height-request: 300;
halign: center;
styles [
"card",
]
}
Label {
label: bind template.item as <$Game>.name;
ellipsize: middle;
}
};
}
};
};
};
styles [
"view",
]
};
}