1
0
Fork 0

FGQCanvas: Fix UI visibility in daemon mode

This commit is contained in:
James Turner 2019-09-01 12:58:21 +01:00
parent 6e465f9dbe
commit 77ef2b6b7e

View file

@ -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; }