Polish + consistency:
- Compact playlist header (cover 150px; nav->header spacing
homologated with AlbumView); description truncated to ~2 lines +
"Read more" modal; custom-artwork buttons only on cover hover.
- New Typography.section (18px) token for hero/section titles,
applied across Album / Artist / Mix / Playlist + Home carousels.
- Shorter track rows app-wide (50px row, 36px artwork, -1 fonts);
+3px column-header/divider gap; wider track-number column.
- Reusable ExpandableSearch (the JumpNavBar page-search pattern:
magnifier -> opens left -> X to close) in the playlist action row.
- Custom ListScrollbar (thicker, min thumb height, own gutter) since
Slint's ListView scrollbar can't be styled.
Sort:
- Default / Title / Artist / Album / Duration with asc/desc per
field, plus Custom (manual order persisted in library.db with
up/down reorder). Client-side search + sort combined.
WIP: track drag-and-drop onto sidebar playlists
- DragState/DragActions globals, drag source on the shared TrackRow,
follow-cursor DragGhost, sidebar playlist rows self-detect the drop
via absolute-position, multi-select group drag, add_tracks_to_playlist
on drop, Flickables freeze scroll during a drag.
- KNOWN ISSUE: the ghost is offset from the cursor (the row
absolute-position + pointer mapping is off, esp. inside Flickables).
Diagnostic logging is left in (TrackRow debug() + a start log) to
pin down the wrong term before the generic fix.
cc
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
// Floating drag ghost — the dark pill that follows the cursor while
|
|
// tracks are being dragged onto the sidebar. Mirrors Tauri's
|
|
// setDragImage pill: "N tracks" for a group, or title + "artist ·
|
|
// album" for one. Visual only (no TouchArea, so it never blocks the
|
|
// pointer). Rendered once at the top of AppShell.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Typography } from "../foundation/typography.slint";
|
|
import { DragState } from "../state.slint";
|
|
|
|
export component DragGhost inherits Rectangle {
|
|
if DragState.active: Rectangle {
|
|
x: DragState.pointer-x + 10px;
|
|
y: DragState.pointer-y + 14px;
|
|
width: pill.preferred-width;
|
|
height: pill.preferred-height;
|
|
border-radius: 8px;
|
|
background: #1e1e28e0;
|
|
border-width: 1px;
|
|
border-color: #ffffff1f;
|
|
drop-shadow-blur: 14px;
|
|
drop-shadow-color: #00000059;
|
|
|
|
pill := VerticalLayout {
|
|
padding-left: 14px;
|
|
padding-right: 14px;
|
|
padding-top: 8px;
|
|
padding-bottom: 8px;
|
|
spacing: 2px;
|
|
Text {
|
|
text: DragState.count > 1
|
|
? DragState.count + " " + @tr("tracks")
|
|
: DragState.ghost-title;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
font-weight: Typography.medium;
|
|
}
|
|
if DragState.count == 1 && DragState.ghost-subtitle != "": Text {
|
|
text: DragState.ghost-subtitle;
|
|
color: #ffffff8c;
|
|
font-size: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|