fix(playlist): reorder via the existing row drag gesture, not a bespoke grip
The prior reorder reused only the DragGhost but re-implemented the drag gesture with its own grip + absolute-position math, which placed the ghost several px off the cursor. Remove the grip entirely and drive reorder off the SAME row-body drag that already adds a track to a sidebar playlist: it captures the source index on start, the shared DragGhost (positioned by the Rust DragActions path) follows the cursor exactly, the drop slot is read from DragState.pointer-y against the ListView's absolute-position (no row double-count), and releasing WITHIN the list reorders while releasing on a sidebar playlist still adds. Reverted the sidebar drop suppression + removed DragState.reorder. cc
This commit is contained in:
4 files changed
+145
-197
No files matched your search
@@ -968,12 +968,6 @@ export global DragState {
|
||||
in-out property <length> pointer-y;
|
||||
// The sidebar playlist id currently under the pointer (drop target).
|
||||
in-out property <string> over-playlist-id;
|
||||
// WITHIN-LIST reorder drag (playlist custom order, issue #589): the
|
||||
// gesture reuses this global purely for the floating ghost (DragGhost's
|
||||
// window-coord positioning), driven from .slint only — DragActions is
|
||||
// never called, so the Rust add-to-playlist drop path never runs.
|
||||
// Sidebar rows skip drop-target detection while this is set.
|
||||
in-out property <bool> reorder: false;
|
||||
}
|
||||
|
||||
export global DragActions {
|
||||
|
||||
Reference in new issue
Block a user