Merge pull request #11627 from druiz17/reload-script

fixed toolbar disapearing after reloading default scripts
This commit is contained in:
Brad Hefta-Gaub 2017-10-19 09:32:36 -07:00 committed by GitHub
commit f951a23356
2 changed files with 8 additions and 1 deletions

View file

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

View file

@ -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) {