Commit 352dd00a authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Collapse): use style file

parent ab21a4e5
import QtQuick 2.7 import QtQuick 2.7
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/image' import 'qrc:/ui/style'
import 'qrc:/ui/style' as Style
// =================================================================== // ===================================================================
...@@ -19,19 +17,22 @@ Item { ...@@ -19,19 +17,22 @@ Item {
} }
ActionButton { ActionButton {
anchors.centerIn: parent
background: Style.CollapseStyle.background
icon: 'collapse'
iconSize: 32
id: button id: button
anchors.centerIn: parent
background: CollapseStyle.background
icon: CollapseStyle.icon
iconSize: CollapseStyle.iconSize
onClicked: collapse() onClicked: collapse()
} }
RotationAnimation { RotationAnimation {
id: rotate
direction: RotationAnimation.Clockwise direction: RotationAnimation.Clockwise
duration: 200 duration: CollapseStyle.animationDuration
from: isCollapsed ? 0 : 180 from: isCollapsed ? 0 : 180
id: rotate
property: 'rotation' property: 'rotation'
target: button target: button
to: isCollapsed ? 180 : 0 to: isCollapsed ? 180 : 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment