editor: implement tracks editor parts list

This commit is contained in:
Elias Projahn 2025-02-16 08:46:40 +01:00
parent 642d9340e5
commit 53680df13d
15 changed files with 311 additions and 32 deletions

View file

@ -0,0 +1,35 @@
using Gtk 4.0;
using Adw 1;
template $MusicusTracksEditorPartsPopover: Gtk.Popover {
styles [
"selector"
]
Adw.ToolbarView {
[top]
Gtk.SearchEntry search_entry {
placeholder-text: _("Search parts…");
margin-start: 8;
margin-end: 8;
margin-top: 8;
margin-bottom: 6;
search-changed => $search_changed() swapped;
activate => $activate() swapped;
stop-search => $stop_search() swapped;
}
Gtk.ScrolledWindow scrolled_window {
height-request: 200;
Gtk.ListBox list_box {
styles [
"selector-list"
]
selection-mode: none;
activate-on-single-click: true;
}
}
}
}

View file

@ -13,8 +13,21 @@ template $MusicusTracksEditorTrackRow: Adw.ActionRow {
}
}
Gtk.Button reset_button {
icon-name: "edit-clear-symbolic";
tooltip-text: _("Clear selected work parts");
visible: false;
valign: center;
clicked => $reset() swapped;
styles [
"flat"
]
}
Gtk.Button {
icon-name: "user-trash-symbolic";
tooltip-text: _("Remove this track");
valign: center;
clicked => $remove() swapped;