mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
38 lines
771 B
QML
38 lines
771 B
QML
import QtQuick 2.7
|
|
|
|
import 'qrc:/ui/components/image'
|
|
|
|
// ===================================================================
|
|
|
|
Item {
|
|
property bool enabled: false
|
|
|
|
signal collapsed (bool collapsed)
|
|
|
|
function updateCollapse () {
|
|
enabled = !enabled
|
|
collapsed(enabled)
|
|
rotate.start()
|
|
}
|
|
|
|
Icon {
|
|
anchors.fill: parent
|
|
id: backgroundImage
|
|
icon: 'collapse'
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: updateCollapse()
|
|
}
|
|
}
|
|
|
|
RotationAnimation {
|
|
direction: RotationAnimation.Clockwise
|
|
duration: 200
|
|
from: enabled ? 0 : 180
|
|
id: rotate
|
|
property: 'rotation'
|
|
target: backgroundImage
|
|
to: enabled ? 180 : 0
|
|
}
|
|
}
|