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-11-13 17:51:55 +00:00
|
|
|
child: Stack {
|
|
|
|
visible-child-name: bind $visible_child_name(template.model as <$GListStore>.n-items) as <string>;
|
2024-10-20 14:15:22 +00:00
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
StackPage {
|
|
|
|
name: "empty";
|
2024-10-10 10:12:43 +00:00
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
child: Adw.StatusPage {
|
|
|
|
icon-name: "list-remove-all";
|
|
|
|
title: "No songs queued";
|
|
|
|
};
|
|
|
|
}
|
2024-10-19 11:29:39 +00:00
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
StackPage {
|
|
|
|
name: "not-empty";
|
2024-11-13 17:49:08 +00:00
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
child: Box {
|
|
|
|
name: "play-queue-page";
|
|
|
|
homogeneous: true;
|
2024-10-20 14:15:22 +00:00
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
Adw.Clamp {
|
|
|
|
halign: center;
|
|
|
|
margin-top: 24;
|
|
|
|
margin-bottom: 24;
|
|
|
|
margin-start: 24;
|
|
|
|
margin-end: 24;
|
2024-10-19 11:29:39 +00:00
|
|
|
|
2024-11-24 18:16:37 +00:00
|
|
|
Overlay {
|
2024-11-13 17:51:55 +00:00
|
|
|
valign: center;
|
2024-10-25 09:05:01 +00:00
|
|
|
|
2024-11-24 18:16:37 +00:00
|
|
|
[overlay]
|
|
|
|
ProgressBar pulse_bar {
|
2024-11-25 19:18:10 +00:00
|
|
|
styles [
|
|
|
|
"osd"
|
|
|
|
]
|
|
|
|
|
2024-11-24 18:16:37 +00:00
|
|
|
valign: start;
|
|
|
|
}
|
|
|
|
|
|
|
|
child: Picture {
|
2024-11-25 19:18:10 +00:00
|
|
|
styles [
|
|
|
|
"playing-cover-art"
|
|
|
|
]
|
2024-11-24 18:16:37 +00:00
|
|
|
|
|
|
|
valign: center;
|
|
|
|
halign: center;
|
|
|
|
paintable: bind template.playing-cover-art;
|
|
|
|
};
|
2024-11-13 17:51:55 +00:00
|
|
|
}
|
2024-11-13 17:49:08 +00:00
|
|
|
}
|
|
|
|
|
2024-11-13 17:51:55 +00:00
|
|
|
Adw.Bin {
|
|
|
|
name: "play-queue";
|
|
|
|
hexpand: true;
|
|
|
|
halign: fill;
|
|
|
|
margin-top: 48;
|
|
|
|
margin-bottom: 48;
|
|
|
|
margin-start: 24;
|
|
|
|
margin-end: 24;
|
2024-11-13 17:49:08 +00:00
|
|
|
|
|
|
|
child: ScrolledWindow {
|
|
|
|
hexpand: true;
|
|
|
|
hscrollbar-policy: never;
|
|
|
|
|
|
|
|
ListView view {
|
|
|
|
single-click-activate: true;
|
|
|
|
activate => $on_row_activated() swapped;
|
|
|
|
|
|
|
|
model: NoSelection {
|
|
|
|
model: bind template.model;
|
|
|
|
};
|
2024-10-15 11:27:47 +00:00
|
|
|
|
2024-11-13 17:49:08 +00:00
|
|
|
factory: SignalListItemFactory {
|
|
|
|
setup => $on_song_list_setup() swapped;
|
|
|
|
bind => $on_song_list_bind() swapped;
|
|
|
|
unbind => $on_song_list_unbind() swapped;
|
|
|
|
};
|
|
|
|
}
|
2024-10-25 09:05:01 +00:00
|
|
|
};
|
|
|
|
}
|
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
|
|
|
}
|