mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
feat(Popup): better transitions
This commit is contained in:
parent
5be1c604c6
commit
743eef0fde
1 changed files with 17 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ Item {
|
|||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
implicitHeight: _computeHeight()
|
||||
implicitHeight: 0
|
||||
opacity: 0
|
||||
visible: false
|
||||
z: Constants.zPopup
|
||||
|
|
@ -76,7 +76,7 @@ Item {
|
|||
|
||||
// Block clicks, wheel... below menu.
|
||||
MouseArea {
|
||||
anchors.fill: content
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onWheel: {}
|
||||
}
|
||||
|
|
@ -115,6 +115,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
focus: true // Necessary to use `Keys.onEscapePressed`.
|
||||
implicitHeight: _computeHeight()
|
||||
opacity: 1.0
|
||||
target: menu
|
||||
}
|
||||
|
|
@ -138,12 +139,26 @@ Item {
|
|||
property: 'opacity'
|
||||
target: menu
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
duration: PopupStyle.animation.openingDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
property: 'implicitHeight'
|
||||
target: menu
|
||||
}
|
||||
},
|
||||
|
||||
Transition {
|
||||
from: 'opened'
|
||||
to: ''
|
||||
|
||||
NumberAnimation {
|
||||
duration: PopupStyle.animation.closingDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
property: 'implicitHeight'
|
||||
target: menu
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
ScriptAction {
|
||||
script: menuClosed()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue