Add option to pan ScrollView by dragging #2260
Labels
a:widgets
Implementation of widgets (from std-widgets.slint) and their styles (mF,bS)
enhancement
New feature or request
Ref #2235
ScrollView has an internal Flickable, with
interactive: false
. Thisinteractive
could be exposed via a public property on the ScrollView (could be called e.g.draggable
orpannable
), so that the ScrollView can also be panned by dragging the contents if desired. Use case: image viewer that can be panned both with the mouse and with the scroll bars.A workaround is
This looks a bit confusing (at least to me), but it works because moving the viewport also moves the TouchArea, until
mouse-x - pressed-x
becomes zero. (This simple version doesn't respect the boundaries of the ScrollView, it's possible to pan the inner Rectangle too far.)The text was updated successfully, but these errors were encountered: