audrey/src/play_queue.blp
2024-10-12 20:52:29 +00:00

68 lines
1.6 KiB
Text

using Gtk 4.0;
using Adw 1;
template $PlayQueue: Adw.NavigationPage {
title: _("Play queue");
Adw.ToolbarView {
[top]
Adw.HeaderBar {
Button {
icon-name: "edit-clear-all";
clicked => $clear ();
sensitive: bind template.can_clear_all;
}
}
ScrolledWindow {
ColumnView {
styles [ "data-table" ]
model: SingleSelection selection {
model: bind template.songs;
selected: bind template.selected_index;
selection-changed => $on_song_selected ();
};
ColumnViewColumn {
factory: SignalListItemFactory {
setup => $delete_cell_setup ();
};
}
ColumnViewColumn {
title: _("Title");
expand: true;
factory: BuilderListItemFactory {
template ColumnViewCell {
child: Label {
halign: start;
label: bind template.item as <$Song>.title;
tooltip-text: bind template.item as <$Song>.title;
ellipsize: end;
};
}
};
}
ColumnViewColumn {
title: _("Artist");
fixed-width: 200;
factory: BuilderListItemFactory {
template ColumnViewCell {
child: Label {
halign: start;
label: bind template.item as <$Song>.artist;
tooltip-text: bind template.item as <$Song>.artist;
ellipsize: end;
};
}
};
}
}
}
}
}