Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r94f7349bd073a732dba5295250fc0e26f740743c -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 94f7349bd073a732dba5295250fc0e26f740743c) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) @@ -25,6 +25,9 @@ * \brief The parent item for modal dialogs */ Dialog { id : _root + property bool autoHide : false + property int autoHideDuration : 1000 + width : Variables.poweroffWidth height : Variables.poweroffHeight visible : false @@ -48,4 +51,24 @@ color : Colors.backgroundDialog radius: Variables.dialogRadius } + + onVisibleChanged: { + if (autoHide && visible) { + _autoHideAnimation.start() + console.debug("_autoHideAnimation started") + } + } + + + NumberAnimation { id: _autoHideAnimation + running: false + target: _root + property: "opacity" + duration: autoHideDuration + //easing.type: Easing.InOutQuad + onFinished: { + console.debug("_autoHideAnimation finished") + _root.visible = false + } + } }