Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r65bff6538499d8a7592f5b664982b69d90d102c2 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 65bff6538499d8a7592f5b664982b69d90d102c2) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -7,7 +7,7 @@ * * \file MainMenu.qml * \author (last) Behrouz NematiPour - * \date (last) 31-May-2022 + * \date (last) 27-Apr-2023 * \author (original) Behrouz NematiPour * \date (original) 17-Oct-2019 * @@ -39,6 +39,7 @@ property bool hasLogo : false property int currentIndex : 0 property string currentTitle : titles[currentIndex] + property bool disable : false /*! * \brief Emits when a menu item pressed @@ -167,10 +168,11 @@ // hidden animation to hide the menu nicely. Behavior on y { PropertyAnimation { /*duration: 500; easing.type: Easing.OutBounce*/ } } onHiddenChanged: { + let isHidden = hidden || disable if ( position === MainMenu.Position.Top ) { - y = hidden ? - Variables.mainMenuHeight : 0 + y = isHidden ? - Variables.mainMenuHeight : 0 } else { - y = Variables.applicationHeight - (hidden ? 0 : Variables.mainMenuHeight) + y = Variables.applicationHeight - (isHidden ? 0 : Variables.mainMenuHeight) } } }