Add playlist view

This commit is contained in:
Elias Projahn 2023-10-25 17:45:32 +02:00
parent 16d1408194
commit 7d21617e9a
14 changed files with 430 additions and 57 deletions

View file

@ -22,6 +22,15 @@ template $MusicusPlaylistPage : Adw.Bin {
Adw.Clamp {
maximum-size: 1000;
tightening-threshold: 600;
Gtk.ListView playlist {
styles ["playlist", "background"]
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
single-click-activate: true;
}
}
}
}

45
data/ui/playlist_tile.blp Normal file
View file

@ -0,0 +1,45 @@
using Gtk 4.0;
using Adw 1;
template $MusicusPlaylistTile : Gtk.Box {
styles ["playlisttile"]
Adw.Bin {
width-request: 48;
Gtk.Image playing_icon {
visible: false;
icon-name: "media-playback-start-symbolic";
}
}
Gtk.Box {
margin-end: 12;
orientation: vertical;
Gtk.Label title_label {
styles ["title"]
visible: false;
margin-top: 24;
halign: start;
wrap: true;
}
Gtk.Label performances_label {
styles ["subtitle", "dim-label"]
visible: false;
halign: start;
wrap: true;
}
Gtk.Label part_title_label {
styles ["parttitle"]
margin-top: 12;
margin-bottom: 12;
visible: false;
margin-start: 24;
halign: start;
wrap: true;
}
}
}

View file

@ -16,13 +16,6 @@ template $MusicusWindow : Adw.ApplicationWindow {
}
};
}
Gtk.StackPage {
name: "playlist";
child: $MusicusPlaylistPage {
close => $hide_playlist() swapped;
};
}
}
[bottom]