From ee8449712c243114d235d0a5636387af48c1b871 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 5 Jun 2015 13:23:06 -0700 Subject: [PATCH] Code review and tidying --- interface/resources/qml/ErrorDialog.qml | 2 -- interface/resources/qml/LoginDialog.qml | 10 +++++----- interface/resources/qml/controls/Dialog.qml | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/interface/resources/qml/ErrorDialog.qml b/interface/resources/qml/ErrorDialog.qml index 1757aee376..26b18f4ffd 100644 --- a/interface/resources/qml/ErrorDialog.qml +++ b/interface/resources/qml/ErrorDialog.qml @@ -17,8 +17,6 @@ Dialog { id: root HifiConstants { id: hifi } - property bool destroyOnInvisible: true - Component.onCompleted: { enabled = true } diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index aa6cbb162d..3291fed0d0 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -39,14 +39,14 @@ Dialog { implicitWidth: isCircular() ? circularBackground.width : rectangularBackground.width implicitHeight: isCircular() ? circularBackground.height : rectangularBackground.height - property int inputWidth: 500 - property int inputHeight: 60 + readonly property int inputWidth: 500 + readonly property int inputHeight: 60 + readonly property int borderWidth: 30 + readonly property int closeMargin: 16 + readonly property real tan30: 0.577 // tan(30°) property int inputSpacing: isCircular() ? 24 : 16 - property int borderWidth: 30 - property int closeMargin: 16 property int maximumX: parent ? parent.width - width : 0 property int maximumY: parent ? parent.height - height : 0 - property real tan30: 0.577 // tan(30°) Rectangle { id: circularBackground diff --git a/interface/resources/qml/controls/Dialog.qml b/interface/resources/qml/controls/Dialog.qml index 63430bdae0..3cada90c3e 100644 --- a/interface/resources/qml/controls/Dialog.qml +++ b/interface/resources/qml/controls/Dialog.qml @@ -15,7 +15,7 @@ import "../styles" Item { id: root - property int animationDuration: hifi.effects.fadeInDuration + property bool destroyOnInvisible: true // The UI enables an object, rather than manipulating its visibility, so that we can do animations in both directions. @@ -32,7 +32,7 @@ Item { Behavior on opacity { // Animate opacity. NumberAnimation { - duration: animationDuration + duration: hifi.effects.fadeInDuration easing.type: Easing.OutCubic } }