feat(slint): favorites tracks group-by (Off / Album / Artist / Name)

Add a group QbzSelect to the Tracks toolbar. derive_tracks reorders the
visible rows by the group key (album+title, artist+album+title, or
title) so a group's tracks sit together. Visible group-header rows are
deferred until the list is virtualized (the list is a plain for today);
this is the group-ordering half, matching how Tauri's tracks tab uses
grouping as the ordering mechanism.

cc
This commit is contained in:
vicrodh committed 2026-05-27 07:13:07 -06:00
1 parent 39b7b6d2f1
commit 2fce47bd06
4 files changed
+60 -3

No files matched your search

@@ -420,6 +420,29 @@ export component FavoritesView inherits Rectangle {
}
}
}
VerticalLayout {
alignment: center;
QbzSelect {
menu-width: 150px;
options: [
@tr("Group: Off"),
@tr("Group: Album"),
@tr("Group: Artist"),
@tr("Group: Name"),
];
current-index: FavoritesState.tracks-group-mode == "off" ? 0
: FavoritesState.tracks-group-mode == "album" ? 1
: FavoritesState.tracks-group-mode == "artist" ? 2
: 3;
selected(i) => {
FavoritesActions.tracks-set-group(
i == 0 ? "off"
: i == 1 ? "album"
: i == 2 ? "artist"
: "name");
}
}
}
}
if FavoritesState.tracks.length > 0: Rectangle { height: 12px; }