Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -rbf9223700613ced6c377f3e3a7b4de8367c30474 -rb12cc2840bb819c5222bfd3bc2cc5ca6eb4c37fd --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision bf9223700613ced6c377f3e3a7b4de8367c30474) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision b12cc2840bb819c5222bfd3bc2cc5ca6eb4c37fd) @@ -39,6 +39,7 @@ property bool showDropShadow : false property alias backgroundItem : _backgroundItem.children property alias backgroundItemZ : _backgroundItem.z + property bool closeOnStateChange : true width : Variables.dialogWidth height : Variables.dialogHeight @@ -47,8 +48,8 @@ x: Math.round((Variables.applicationWidth - width) / 2) y: Math.round((Variables.applicationHeight - height) / 2) - enter: Transition { NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200 } } - exit : Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200 } } + enter: Transition { NumberAnimation { property: "scale"; from: 0.8; to: 1.0; duration: 200; easing.type: Easing.OutCubic } } + exit : Transition { NumberAnimation { property: "scale"; from: 1.0; to: 0.8; duration: 200; easing.type: Easing.InCubic } } modal: true @@ -58,7 +59,7 @@ anchors.bottomMargin: _alarmBar.visible ? Variables.notificationHeight : 0 color : "#99000000" - Behavior on opacity { NumberAnimation { duration: 300} } + Behavior on opacity { NumberAnimation { duration: 200} } } background: Rectangle { id: _backgroundRect @@ -87,6 +88,11 @@ } } + // fix closing opened dialogs when opmode is changed + Connections { target: vTDOpMode + function onOpModeChanged() { if ( _root.visible && _root.closeOnStateChange ) { _root.close() } } + } + NumberAnimation { id: _autoHideAnimation running: false target: _root