From 36912f1cd4d1d5ed0d504ccaae0e4178f663058f Mon Sep 17 00:00:00 2001 From: druiz17 Date: Wed, 18 Oct 2017 16:03:32 -0700 Subject: [PATCH] fixed toolbar disapearing after reloading default scripts --- interface/resources/qml/hifi/toolbars/Toolbar.qml | 1 + interface/resources/qml/windows/Fadable.qml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/toolbars/Toolbar.qml b/interface/resources/qml/hifi/toolbars/Toolbar.qml index 9015c026b0..4710fa3256 100644 --- a/interface/resources/qml/hifi/toolbars/Toolbar.qml +++ b/interface/resources/qml/hifi/toolbars/Toolbar.qml @@ -19,6 +19,7 @@ Window { shown: true width: content.width height: content.height + disableFade: true // Disable this window from being able to call 'desktop.raise() and desktop.showDesktop' activator: Item {} property bool horizontal: true diff --git a/interface/resources/qml/windows/Fadable.qml b/interface/resources/qml/windows/Fadable.qml index 38cd4bf1f9..6bbd1edcac 100644 --- a/interface/resources/qml/windows/Fadable.qml +++ b/interface/resources/qml/windows/Fadable.qml @@ -26,6 +26,7 @@ FocusScope { property var completionCallback; // The target property to animate, usually scale or opacity property alias fadeTargetProperty: root.opacity + property bool disableFade: false // always start the property at 0 to enable fade in on creation fadeTargetProperty: 0 // DO NOT set visible to false or when derived types override it it @@ -35,6 +36,9 @@ FocusScope { // Some dialogs should be destroyed when they become // invisible, so handle that onVisibleChanged: { + if (disableFade) { + return; + } // If someone directly set the visibility to false // toggle it back on and use the targetVisible flag to transition // via fading. @@ -62,7 +66,9 @@ FocusScope { } onFadeTargetPropertyChanged: { - visible = (fadeTargetProperty != 0.0); + if (!disableFade) { + visible = (fadeTargetProperty != 0.0); + } } function fadeIn(callback) {