Commit 4a033737 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Popup): better transitions

parent 9976c543
...@@ -126,7 +126,10 @@ Item { ...@@ -126,7 +126,10 @@ Item {
to: 'opened' to: 'opened'
ScriptAction { ScriptAction {
script: menu.visible = true script: {
menu.visible = true
menuOpened()
}
} }
NumberAnimation { NumberAnimation {
...@@ -135,39 +138,26 @@ Item { ...@@ -135,39 +138,26 @@ Item {
property: 'opacity' property: 'opacity'
target: menu target: menu
} }
SequentialAnimation {
PauseAnimation {
duration: PopupStyle.animation.openingDuration
}
ScriptAction {
script: menuOpened()
}
}
}, },
Transition { Transition {
from: 'opened' from: 'opened'
to: '' to: ''
NumberAnimation {
duration: PopupStyle.animation.closingDuration
easing.type: Easing.InOutQuad
property: 'opacity'
target: menu
}
SequentialAnimation { SequentialAnimation {
PauseAnimation { ScriptAction {
script: menuClosed()
}
NumberAnimation {
duration: PopupStyle.animation.closingDuration duration: PopupStyle.animation.closingDuration
easing.type: Easing.InOutQuad
property: 'opacity'
target: menu
} }
ScriptAction { ScriptAction {
script: { script: visible = false
visible = false
menuClosed()
}
} }
} }
} }
......
...@@ -82,16 +82,12 @@ Item { ...@@ -82,16 +82,12 @@ Item {
from: 'opened' from: 'opened'
to: '' to: ''
NumberAnimation {
duration: PopupStyle.animation.closingDuration
easing.type: Easing.InOutQuad
property: 'opacity'
target: popup
}
SequentialAnimation { SequentialAnimation {
PauseAnimation { NumberAnimation {
duration: PopupStyle.animation.closingDuration duration: PopupStyle.animation.closingDuration
easing.type: Easing.InOutQuad
property: 'opacity'
target: popup
} }
ScriptAction { ScriptAction {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment