mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Show albums on home screen
This commit is contained in:
parent
3ab0332475
commit
38613c0063
7 changed files with 172 additions and 3 deletions
25
data/ui/album_tile.blp
Normal file
25
data/ui/album_tile.blp
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue