fix(myqbz): context menus — z-index, Remove/queue wiring, sidebar + album->collection
- Detail row ⋯ menu (and the hero overflow + filter popups) were PopupWindows
with no explicit height, so they collapsed and the rows below painted over them.
Gave each an explicit height (+ close-on-click) like every other app menu, so
they paint above the rows.
- Row menu Remove now actually removes: it was a no-op ("remove" wasn't a RowMode)
-> wired to remove the item (repo::remove_item by position, reload). Add-to-queue
was also silently broken (emitted "play-later", unparsed) -> now "add-to-queue".
- Sidebar playlist right-click menu: added "Add to Mixtape/Collection" (opens the
picker with the playlist payload).
- Album -> Collection: an album can now be added to ANY collection kind incl.
artist_collection (removed the ArtistCollection exclusion in load_rows; Tauri
allows adding an album to an artist discography).
Offline in the row menu is net-new (Tauri's collection row menu has none; it would
be a batch resolve-then-cache) and is NOT added here. Backend crates untouched.
cargo check -p qbz-slint green.
cc
This commit is contained in:
6 files changed
+125
-5
No files matched your search
@@ -119,6 +119,7 @@ component SidebarRow inherits Rectangle {
|
||||
callback edit-folder(string);
|
||||
callback hide-playlist(string);
|
||||
callback hide-folder(string);
|
||||
callback add-to-mixtape(string);
|
||||
// Fires on row hover enter/leave so the sidebar can reveal the scrollbar
|
||||
// while the pointer is anywhere over the scrollable list.
|
||||
callback hover-changed(bool);
|
||||
@@ -404,6 +405,14 @@ component SidebarRow inherits Rectangle {
|
||||
menu.close();
|
||||
}
|
||||
}
|
||||
if !root.is-folder: ContextMenuItem {
|
||||
icon: @image-url("../assets/icons/cassette-tape.svg");
|
||||
label: @tr("Add to Mixtape/Collection");
|
||||
clicked => {
|
||||
root.add-to-mixtape(root.entry.id);
|
||||
menu.close();
|
||||
}
|
||||
}
|
||||
// Divider before the move-to-folder section.
|
||||
if !root.is-folder: Rectangle {
|
||||
height: 7px;
|
||||
@@ -867,6 +876,9 @@ export component Sidebar inherits Rectangle {
|
||||
hide-folder(id) => {
|
||||
SidebarActions.hide-folder(id);
|
||||
}
|
||||
add-to-mixtape(id) => {
|
||||
SidebarActions.add-to-mixtape(id);
|
||||
}
|
||||
hover-changed(h) => {
|
||||
pl-sb.hover-rows = h ? pl-sb.hover-rows + 1 : Math.max(0, pl-sb.hover-rows - 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user