audrey/resources/play_queue.blp

47 lines
1 KiB
Text
Raw Normal View History

2024-10-10 10:12:43 +00:00
using Gtk 4.0;
2024-10-25 09:05:01 +00:00
using Adw 1;
2024-10-10 10:12:43 +00:00
2024-10-29 14:46:33 +00:00
template $AudreyUiPlayQueue: Adw.Bin {
2024-10-20 14:15:22 +00:00
name: "play-queue";
2024-10-28 08:52:50 +00:00
child: Stack {
2024-10-29 14:46:33 +00:00
visible-child-name: bind $visible_child_name (template.playbin as <$AudreyPlaybin>.play-queue-length) as <string>;
2024-10-10 10:12:43 +00:00
2024-10-25 09:05:01 +00:00
StackPage {
name: "empty";
2024-10-19 11:29:39 +00:00
2024-10-25 09:05:01 +00:00
child: Adw.StatusPage {
icon-name: "list-remove-all";
title: "No songs queued";
};
}
2024-10-20 14:15:22 +00:00
2024-10-25 09:05:01 +00:00
StackPage {
name: "not-empty";
2024-10-19 11:29:39 +00:00
2024-10-25 09:05:01 +00:00
child: ScrolledWindow {
hexpand: true;
vscrollbar-policy: always;
hscrollbar-policy: never;
ListView view {
show-separators: true;
single-click-activate: true;
activate => $on_row_activated ();
model: NoSelection {
2024-10-29 14:46:33 +00:00
model: bind template.playbin as <$AudreyPlaybin>.play_queue;
2024-10-25 09:05:01 +00:00
};
2024-10-25 09:05:01 +00:00
factory: SignalListItemFactory {
setup => $on_song_list_setup ();
bind => $on_song_list_bind ();
unbind => $on_song_list_unbind ();
};
}
2024-10-20 13:30:22 +00:00
};
2024-10-10 10:12:43 +00:00
}
2024-10-28 08:52:50 +00:00
};
2024-10-10 10:12:43 +00:00
}