audrey/resources/play_queue.blp
2024-11-16 09:57:14 +01:00

73 lines
1.6 KiB
Text

using Gtk 4.0;
using Adw 1;
template $AudreyUiPlayQueue: Adw.Bin {
child: Stack {
visible-child-name: bind $visible_child_name(template.model as <$GListStore>.n-items) as <string>;
StackPage {
name: "empty";
child: Adw.StatusPage {
icon-name: "list-remove-all";
title: "No songs queued";
};
}
StackPage {
name: "not-empty";
child: Box {
name: "play-queue-page";
homogeneous: true;
Adw.Clamp {
halign: center;
margin-top: 24;
margin-bottom: 24;
margin-start: 24;
margin-end: 24;
Picture {
styles [ "playing-cover-art" ]
valign: center;
halign: center;
paintable: bind template.playing-cover-art;
}
}
Adw.Bin {
name: "play-queue";
hexpand: true;
halign: fill;
margin-top: 48;
margin-bottom: 48;
margin-start: 24;
margin-end: 24;
child: ScrolledWindow {
hexpand: true;
hscrollbar-policy: never;
ListView view {
single-click-activate: true;
activate => $on_row_activated() swapped;
model: NoSelection {
model: bind template.model;
};
factory: SignalListItemFactory {
setup => $on_song_list_setup() swapped;
bind => $on_song_list_bind() swapped;
unbind => $on_song_list_unbind() swapped;
};
}
};
}
};
}
};
}