From 4c9b9b68ef8263d2f6f577b16db36a5d0d80b8ba Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 11 May 2016 16:52:56 +0200 Subject: [PATCH] Add add/remove transitions so expand/collapse is animated --- resources/qml/Settings/SettingView.qml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 49beba0990..92f228a9d8 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -68,6 +68,28 @@ ScrollView UM.I18nCatalog { id: catalog; name: "uranium"; } + add: Transition { + SequentialAnimation { + NumberAnimation { properties: "height"; from: 0; duration: 100 } + NumberAnimation { properties: "opacity"; from: 0; duration: 100 } + } + } + remove: Transition { + SequentialAnimation { + NumberAnimation { properties: "opacity"; to: 0; duration: 100 } + NumberAnimation { properties: "height"; to: 0; duration: 100 } + } + } + addDisplaced: Transition { + NumberAnimation { properties: "x,y"; duration: 100 } + } + removeDisplaced: Transition { + SequentialAnimation { + PauseAnimation { duration: 100; } + NumberAnimation { properties: "x,y"; duration: 100 } + } + } + Menu { id: contextMenu;