From 481d6e88cc6eee2c1c020d0c429674a112af5e84 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sat, 18 Sep 2021 16:55:07 +0300 Subject: [PATCH] Animate accordion image rotation --- qml/components/settingsPage/AccordionItem.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qml/components/settingsPage/AccordionItem.qml b/qml/components/settingsPage/AccordionItem.qml index b6539d2..f893116 100644 --- a/qml/components/settingsPage/AccordionItem.qml +++ b/qml/components/settingsPage/AccordionItem.qml @@ -32,7 +32,7 @@ Item { states: [ State { when: area.expanded - PropertyChanges { target: image; rotation: -90 } + PropertyChanges { target: image; rotation: 90 } PropertyChanges { target: content; height: content.implicitHeight + Theme.paddingLarge; opacity: 1.0 } } ] @@ -40,6 +40,7 @@ Item { to: "*" enabled: area.parent.animate NumberAnimation { target: content; properties: "height, opacity"; duration: 200} + NumberAnimation { target: image; properties: "rotation"; duration: 200} } Connections { target: area.parent @@ -90,8 +91,8 @@ Item { } width: visible ? Theme.iconSizeMedium : 0 highlighted: parent.highlighted - source: "image://theme/icon-m-right" - rotation: 90 + source: "image://theme/icon-m-left" + rotation: -90 } } Loader {