From 2a931119bdee73512aef793e8417adaa8274bc89 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 28 May 2015 12:17:21 -0700 Subject: [PATCH] Replace expand/collapse dialog animation with fade in/out --- interface/resources/qml/controls/Dialog.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/controls/Dialog.qml b/interface/resources/qml/controls/Dialog.qml index f32b4e2e66..15c8b7bafc 100644 --- a/interface/resources/qml/controls/Dialog.qml +++ b/interface/resources/qml/controls/Dialog.qml @@ -31,7 +31,7 @@ DialogBase { * Support for animating the dialog in and out. */ enabled: false - scale: 0.0 + opacity: 0.0 // The offscreen UI will enable an object, rather than manipulating it's // visibility, so that we can do animations in both directions. Because @@ -40,20 +40,20 @@ DialogBase { // opacity, and then when the target animation value is reached, we can // modify the visibility onEnabledChanged: { - scale = enabled ? 1.0 : 0.0 + opacity = enabled ? 1.0 : 0.0 } // The actual animator - Behavior on scale { + Behavior on opacity { NumberAnimation { - duration: root.animationDuration - easing.type: Easing.InOutBounce + duration: 300 + easing.type: Easing.OutCubic } } - // Once we're scaled to 0, disable the dialog's visibility - onScaleChanged: { - visible = (scale != 0.0); + // Once we're transparent, disable the dialog's visibility + onOpacityChanged: { + visible = (opacity != 0.0); } // Some dialogs should be destroyed when they become invisible,