Show albums on home screen

This commit is contained in:
Elias Projahn 2024-06-05 13:26:47 +02:00
parent 3ab0332475
commit 38613c0063
7 changed files with 172 additions and 3 deletions

25
data/ui/album_tile.blp Normal file
View file

@ -0,0 +1,25 @@
using Gtk 4.0;
using Adw 1;
template $MusicusAlbumTile: Gtk.FlowBoxChild {
styles [
"card",
"activatable",
"tile"
]
Gtk.Box {
valign: center;
Gtk.Label title_label {
styles [
"title"
]
valign: center;
halign: start;
lines: 1;
ellipsize: end;
}
}
}

View file

@ -127,6 +127,23 @@ template $MusicusHomePage : Adw.NavigationPage {
selection-mode: none;
child-activated => $recording_selected() swapped;
}
Gtk.Label {
styles ["heading"]
visible: bind albums_flow_box.visible;
halign: start;
label: _("Albums");
}
Gtk.FlowBox albums_flow_box {
margin-top: 12;
margin-bottom: 24;
column-spacing: 12;
row-spacing: 12;
homogeneous: true;
selection-mode: none;
child-activated => $album_selected() swapped;
}
}
}
};