diff --git a/utils/fgqcanvas/qml/Window.qml b/utils/fgqcanvas/qml/Window.qml index 9a3ab7606..a211ef7c0 100644 --- a/utils/fgqcanvas/qml/Window.qml +++ b/utils/fgqcanvas/qml/Window.qml @@ -7,10 +7,16 @@ Rectangle { color: "black" // only show the UI on the main window - property double __uiOpacity: (isMainWindow && _application.showUI) ? 1.0 : 0.0 + property double __uiOpacity: __shouldShowUi ? 1.0 : 0.0 property bool __uiVisible: true + readonly property bool __shouldShowUi: (isMainWindow && _application.showUI) readonly property bool isMainWindow: (_windowNumber === 0) + Component.onCompleted: { + // synchronize insitial state of this + __uiVisible = __shouldShowUi; + } + Behavior on __uiOpacity { SequentialAnimation { ScriptAction { script: if (_application.showUI) __uiVisible = true; }