mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +03:00
Begin adding slide-in transition
Currently, this doesn't work.
This commit is contained in:
parent
6a77e55c72
commit
a15b5d3fdb
1 changed files with 36 additions and 0 deletions
|
@ -31,12 +31,48 @@ Item {
|
||||||
id: popup
|
id: popup
|
||||||
|
|
||||||
radius: 20
|
radius: 20
|
||||||
|
y: timelineRoot.height + 1
|
||||||
z: 20
|
z: 20
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
height: 75
|
height: 75
|
||||||
width: parent.width
|
width: parent.width
|
||||||
color: colors.window
|
color: colors.window
|
||||||
|
|
||||||
|
// TODO: make this work
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "hidden"
|
||||||
|
PropertyChanges {
|
||||||
|
target: popup
|
||||||
|
y: timelineRoot.height + 1 // hidden
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "shown"
|
||||||
|
PropertyChanges {
|
||||||
|
target: popup
|
||||||
|
y: timelineRoot.height - popup.height
|
||||||
|
visible: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
state: "hidden"
|
||||||
|
|
||||||
|
transitions: Transition {
|
||||||
|
from: "hidden"
|
||||||
|
to: "shown"
|
||||||
|
reversible: true
|
||||||
|
|
||||||
|
NumberAnimation {
|
||||||
|
target: popup
|
||||||
|
property: y
|
||||||
|
duration: 5000
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
alwaysRunToEnd: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: row
|
id: row
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue