mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-01 17:24:48 +00:00
stripe autohide
This commit is contained in:
parent
353bffc51c
commit
4296d6b648
1 changed files with 9 additions and 6 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue