mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +03:00
Continue work on animation
This *still* doesn't work.
This commit is contained in:
parent
31ea6413c6
commit
1918e89a0d
1 changed files with 26 additions and 46 deletions
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue