stripe autohide

This commit is contained in:
Aaron Seigo 2014-08-19 17:54:03 +02:00
parent 353bffc51c
commit 4296d6b648

View file

@ -13,26 +13,29 @@ Leaves {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onPressed: { onPressed: {
stripe.visible = true; stripe.opacity = 1;
} }
} }
SatelliteStripe { SatelliteStripe {
id: stripe id: stripe
visible: false
opacity: 0 opacity: 0
onVisibleChanged: {
opacity = visible ? 1 : 0;
}
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {
duration: 300 duration: 500
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
} }
Timer {
id: hideTimer
interval: 1000
running: parent.opacity == 1
onTriggered: parent.opacity = 0
}
PlasmaCore.SvgItem { PlasmaCore.SvgItem {
id: square id: square
property int value: 1 property int value: 1