mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Add playlist view
This commit is contained in:
parent
16d1408194
commit
7d21617e9a
14 changed files with 430 additions and 57 deletions
|
|
@ -34,4 +34,24 @@
|
|||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.playlist {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.playlist > row {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.playlisttile .title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.playlisttile .subtitle {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.playlisttile .parttitle {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
|
@ -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
45
data/ui/playlist_tile.blp
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,13 +16,6 @@ template $MusicusWindow : Adw.ApplicationWindow {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
Gtk.StackPage {
|
||||
name: "playlist";
|
||||
child: $MusicusPlaylistPage {
|
||||
close => $hide_playlist() swapped;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
[bottom]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue