From c00804eff6af01bc005df6795420e40766429f67 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 5 Oct 2017 12:14:57 -0700 Subject: QML UI: always start edit at top of page When starting to edit / add a dive, the Flickable needs to be positioned at the top of the page, not the last position shown. For clarity I'll do the re-indentation in the next commit. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveDetails.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index b1357ef55..3c17641c6 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -84,6 +84,7 @@ Kirigami.Page { Transition { from: "view" to: "*" + ParallelAnimation { SequentialAnimation { NumberAnimation { target: detailsEditFlickable @@ -100,6 +101,15 @@ Kirigami.Page { easing.type: Easing.InOutQuad } } + + NumberAnimation { + target: detailsEditFlickable + property: "contentY" + to: 0 + duration: 200 + easing.type: Easing.InOutQuad + } + } }, Transition { from: "*" -- cgit v1.2.3-70-g09d2