From 8917762ed506079929de3a1ca6ebf487f5185af2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 26 Jun 2017 13:03:28 +0200 Subject: [PATCH] Animate scrolling focussed item into view --- resources/qml/Settings/SettingView.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 752665f2b7..c4477460e4 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -300,13 +300,23 @@ Item } onFocusReceived: { + animateContentY.from = contents.contentY; contents.positionViewAtIndex(index, ListView.Contain); + animateContentY.to = contents.contentY; + animateContentY.running = true; } } } UM.I18nCatalog { id: catalog; name: "cura"; } + NumberAnimation { + id: animateContentY + target: contents + property: "contentY" + duration: 50 + } + add: Transition { SequentialAnimation { NumberAnimation { properties: "height"; from: 0; duration: 100 }