mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-28 11:56:20 +00:00
feat(Collapse): use style file
This commit is contained in:
parent
ab21a4e5d9
commit
352dd00a18
1 changed files with 11 additions and 10 deletions
|
|
@ -1,9 +1,7 @@
|
||||||
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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
||||||
direction: RotationAnimation.Clockwise
|
|
||||||
duration: 200
|
|
||||||
from: isCollapsed ? 0 : 180
|
|
||||||
id: rotate
|
id: rotate
|
||||||
|
|
||||||
|
direction: RotationAnimation.Clockwise
|
||||||
|
duration: CollapseStyle.animationDuration
|
||||||
|
from: isCollapsed ? 0 : 180
|
||||||
property: 'rotation'
|
property: 'rotation'
|
||||||
target: button
|
target: button
|
||||||
to: isCollapsed ? 180 : 0
|
to: isCollapsed ? 180 : 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue