Continue work on animation

This *still* doesn't work.
This commit is contained in:
Loren Burkholder 2021-04-02 14:36:22 -04:00
parent 31ea6413c6
commit 1918e89a0d

View file

@ -22,6 +22,11 @@ Item {
model = undefined model = undefined
} }
state: "hidden"
visible: false
property Item attached: null
property alias model: row.model
// TODO: make this work // TODO: make this work
states: [ states: [
State { State {
@ -41,6 +46,7 @@ Item {
PropertyChanges { PropertyChanges {
target: overlay target: overlay
visible: false visible: false
opacity: 0
} }
}, },
State { State {
@ -60,10 +66,10 @@ Item {
PropertyChanges { PropertyChanges {
target: overlay target: overlay
visible: true visible: true
opacity: 1
} }
} }
] ]
state: "hidden"
transitions: [ transitions: [
Transition { Transition {
@ -71,32 +77,24 @@ Item {
to: "shown" to: "shown"
SequentialAnimation { SequentialAnimation {
ParallelAnimation {
NumberAnimation { NumberAnimation {
target: popupRoot targets: [popupRoot, popup, overlay]
property: "visible" properties: "visible"
duration: 0 duration: 0
} }
NumberAnimation {
target: popup
property: "visible"
duration: 0
}
}
ParallelAnimation { ParallelAnimation {
NumberAnimation { NumberAnimation {
target: popup target: popup
property: "y" property: "y"
duration: 500 duration: 250
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
NumberAnimation { NumberAnimation {
target: overlay target: overlay
property: "visible" property: "opacity"
duration: 500 duration: 250
easing.type: Easing.InQuad easing.type: Easing.InQuad
} }
} }
@ -112,38 +110,27 @@ Item {
NumberAnimation { NumberAnimation {
target: popup target: popup
property: "y" property: "y"
duration: 500 duration: 250
easing.type: Easing.InOutQuad easing.type: Easing.InOutQuad
} }
NumberAnimation { NumberAnimation {
target: overlay target: overlay
property: "visible" property: "opacity"
duration: 500 duration: 250
easing.type: Easing.InQuad easing.type: Easing.InQuad
} }
} }
ParallelAnimation {
NumberAnimation { NumberAnimation {
target: popupRoot targets: [popupRoot, popup, overlay]
property: "visible" properties: "visible"
duration: 0 duration: 0
} }
NumberAnimation {
target: popup
property: "visible"
duration: 0
}
}
} }
} }
] ]
property Item attached: null
property alias model: row.model
Rectangle { Rectangle {
id: popup id: popup
@ -256,24 +243,17 @@ Item {
} }
} }
Rectangle { FastBlur {
id: overlay id: overlay
anchors.fill: parent anchors.fill: parent
source: timelineRoot
radius: 50
z: popupBottomBar.z - 1 z: popupBottomBar.z - 1
visible: false
color: "gray" opacity: 0
opacity: 0.5
TapHandler { TapHandler {
onTapped: popupRoot.hide() onTapped: popupRoot.hide()
} }
// TODO: this needs some work; it doesn't blur very well
FastBlur {
z: overlay.z - 1
anchors.fill: parent
source: timelineRoot
radius: 50
}
} }
} }