Files
qbz/crates/qbz-slint/ui/discover
vicrodh 20b13dbbf1 feat(slint): drag-to-scroll album carousels
Introduces the horizontal drag concept (to be reused widely) on the
discover album Carousel. Replaces the manual page-slide (a clipped
Rectangle translated by -page*step) with a horizontal Flickable:
the row now drags by touch/pointer with kinetic momentum, and card
taps still register because Flickable distinguishes a flick from a
tap — unlike nested TouchAreas, where the card's own TouchArea would
swallow the drag.

  - viewport-height is pinned to the row height so the Flickable
    only scrolls horizontally and never fights the home page's
    vertical Flickable.
  - prev/next buttons nudge viewport-x by one page width (clamped to
    [-max-scroll, 0]); enabled state + the edge fades derive from
    viewport-x.
  - No animate on viewport-x — that would rubber-band the per-frame
    drag updates; button jumps are instant in exchange for smooth
    dragging.

cc
2026-05-20 22:15:10 -06:00
..