From eb51a5b7b60390d192be6e7ce1d440b9938a90a8 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 5 Dec 2018 10:16:48 -0800 Subject: [PATCH] changing opacity to 0.5 --- interface/resources/qml/LoginDialog.qml | 30 ++++++++++++++++++- .../qml/LoginDialog/CantAccessBody.qml | 23 -------------- .../qml/LoginDialog/CompleteProfileBody.qml | 27 ++--------------- .../qml/LoginDialog/LinkAccountBody.qml | 29 ++---------------- .../qml/LoginDialog/LoggingInBody.qml | 4 +-- .../resources/qml/LoginDialog/SignUpBody.qml | 10 +++---- .../qml/LoginDialog/UsernameCollisionBody.qml | 30 ++----------------- .../resources/qml/OverlayLoginDialog.qml | 30 ++++++++++++++++++- .../qml/dialogs/TabletLoginDialog.qml | 30 ++++++++++++++++++- 9 files changed, 102 insertions(+), 111 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index 70815192cc..33e43fdf78 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -36,6 +36,8 @@ FocusScope { property string title: "" property string text: "" property int titleWidth: 0 + property alias bannerWidth: banner.width + property alias bannerHeight: banner.height function tryDestroy() { root.destroy() @@ -50,10 +52,36 @@ FocusScope { } Image { + z: -10 id: loginDialogBackground source: "LoginDialog/background.jpg" anchors.fill: parent - z: -2 + } + + Rectangle { + z: -6 + id: opaqueRect + height: parent.height + width: parent.width + opacity: 0.5 + color: "black" + } + + Item { + z: -5 + id: bannerContainer + width: parent.width + height: banner.height + anchors { + top: parent.top + topMargin: 0.18 * parent.height + } + Image { + id: banner + anchors.centerIn: parent + source: "../images/high-fidelity-banner.svg" + horizontalAlignment: Image.AlignHCenter + } } Keys.onPressed: { diff --git a/interface/resources/qml/LoginDialog/CantAccessBody.qml b/interface/resources/qml/LoginDialog/CantAccessBody.qml index 5d91d9c9ee..7a46f197b6 100644 --- a/interface/resources/qml/LoginDialog/CantAccessBody.qml +++ b/interface/resources/qml/LoginDialog/CantAccessBody.qml @@ -56,29 +56,6 @@ Item { anchors.fill: parent onHeightChanged: d.resize(); onWidthChanged: d.resize(); - Rectangle { - id: opaqueRect - height: parent.height - width: parent.width - opacity: 0.9 - color: "black" - } - Item { - id: bannerContainer - width: parent.width - height: banner.height - anchors { - bottom: textContainer.top - bottomMargin: 0.125 * parent.height - } - Image { - id: banner - anchors.centerIn: parent - source: "../../images/high-fidelity-banner.svg" - horizontalAlignment: Image.AlignHCenter - } - } - Item { id: textContainer width: parent.width diff --git a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml index 8f7401b975..ab81515226 100644 --- a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml +++ b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml @@ -57,29 +57,6 @@ Item { height: root.height onHeightChanged: d.resize(); onWidthChanged: d.resize(); - Rectangle { - id: opaqueRect - height: parent.height - width: parent.width - opacity: 0.9 - color: "black" - } - - Item { - id: bannerContainer - width: parent.width - height: banner.height - anchors { - top: parent.top - topMargin: 0.18 * parent.height - } - Image { - id: banner - anchors.centerIn: parent - source: "../../images/high-fidelity-banner.svg" - horizontalAlignment: Image.AlignHCenter - } - } Item { id: contentItem anchors.fill: parent @@ -105,13 +82,13 @@ Item { Item { id: buttons - width: banner.width + width: root.bannerWidth height: d.minHeightButton anchors { top: parent.top topMargin: (parent.height - additionalTextContainer.height) / 2 - hifi.dimensions.contentSpacing.y left: parent.left - leftMargin: (parent.width - banner.width) / 2 + leftMargin: (parent.width - root.bannerWidth) / 2 } HifiControlsUit.Button { id: cancelButton diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 1e06ead6d2..fe6853b1c4 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -96,36 +96,13 @@ Item { height: root.height onHeightChanged: d.resize(); onWidthChanged: d.resize(); - Rectangle { - id: opaqueRect - height: parent.height - width: parent.width - opacity: 0.9 - color: "black" - } - - Item { - id: bannerContainer - width: parent.width - height: banner.height - anchors { - bottom: loginContainer.top - bottomMargin: 0.07 * parent.height - } - Image { - id: banner - anchors.centerIn: parent - source: "../../images/high-fidelity-banner.svg" - horizontalAlignment: Image.AlignHCenter - } - } Item { id: loginContainer width: emailField.width height: 0.45 * parent.height anchors { top: parent.top - topMargin: bannerContainer.height + 0.25 * parent.height + topMargin: root.bannerHeight + 0.25 * parent.height left: parent.left leftMargin: (parent.width - emailField.width) / 2 } @@ -157,7 +134,7 @@ Item { HifiControlsUit.TextField { id: emailField - width: banner.width + width: root.bannerWidth height: linkAccountBody.textFieldHeight font.pixelSize: linkAccountBody.textFieldFontSize styleRenderType: Text.QtRendering @@ -194,7 +171,7 @@ Item { } HifiControlsUit.TextField { id: passwordField - width: banner.width + width: root.bannerWidth height: linkAccountBody.textFieldHeight font.pixelSize: linkAccountBody.textFieldFontSize styleRenderType: Text.QtRendering diff --git a/interface/resources/qml/LoginDialog/LoggingInBody.qml b/interface/resources/qml/LoginDialog/LoggingInBody.qml index 775f51c1fa..eca58c6441 100644 --- a/interface/resources/qml/LoginDialog/LoggingInBody.qml +++ b/interface/resources/qml/LoginDialog/LoggingInBody.qml @@ -102,7 +102,7 @@ Item { } else if (loggingInBody.withOculus) { // reset the flag. loggingInGlyph.visible = false; - loggingInText.text = "You are now logged into Oculus!" + loggingInText.text = "You are now logged into Oculus!" loggingInText.anchors.centerIn = loggingInHeader; loggingInText.anchors.bottom = loggingInHeader.bottom; loggedInGlyph.text = hifi.glyphs.oculus; @@ -123,7 +123,7 @@ Item { id: opaqueRect height: parent.height width: parent.width - opacity: 0.9 + opacity: 0.7 color: "black" } diff --git a/interface/resources/qml/LoginDialog/SignUpBody.qml b/interface/resources/qml/LoginDialog/SignUpBody.qml index e4e0f5a88c..9ac4075e23 100644 --- a/interface/resources/qml/LoginDialog/SignUpBody.qml +++ b/interface/resources/qml/LoginDialog/SignUpBody.qml @@ -122,10 +122,10 @@ Item { Item { id: loginContainer width: usernameField.width - height: parent.height - bannerContainer.height + height: parent.height anchors { top: parent.top - topMargin: bannerContainer.height + 0.25 * parent.height + topMargin: root.bannerHeight + 0.25 * parent.height left: parent.left leftMargin: (parent.width - usernameField.width) / 2 } @@ -159,7 +159,7 @@ Item { HifiControlsUit.TextField { id: usernameField - width: banner.width + width: root.bannerWidth height: signUpBody.textFieldHeight placeholderText: "Username" font.pixelSize: signUpBody.textFieldFontSize @@ -204,7 +204,7 @@ Item { HifiControlsUit.TextField { id: emailField - width: banner.width + width: root.bannerWidth height: signUpBody.textFieldHeight anchors { top: parent.top @@ -246,7 +246,7 @@ Item { } HifiControlsUit.TextField { id: passwordField - width: banner.width + width: root.bannerWidth height: signUpBody.textFieldHeight placeholderText: "Password" font.pixelSize: signUpBody.textFieldFontSize diff --git a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml index a2670cbf62..24c1afc6af 100644 --- a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml +++ b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml @@ -66,30 +66,6 @@ Item { onHeightChanged: d.resize(); onWidthChanged: d.resize(); anchors.fill: parent - Rectangle { - id: opaqueRect - height: parent.height - width: parent.width - opacity: 0.9 - color: "black" - } - - Item { - id: bannerContainer - width: parent.width - height: banner.height - anchors { - top: parent.top - topMargin: 0.18 * parent.height - } - Image { - id: banner - anchors.centerIn: parent - source: "../../images/high-fidelity-banner.svg" - horizontalAlignment: Image.AlignHCenter - } - } - TextMetrics { id: mainTextContainerTextMetrics font: mainTextContainer.font @@ -129,7 +105,7 @@ Item { font.pixelSize: usernameCollisionBody.fontSize styleRenderType: Text.QtRendering font.bold: usernameCollisionBody.fontBold - width: banner.width + width: root.bannerWidth placeholderText: "Choose your own" @@ -167,13 +143,13 @@ Item { Item { id: buttons - width: banner.width + width: root.bannerWidth height: d.minHeightButton anchors { top: textField.bottom topMargin: hifi.dimensions.contentSpacing.y left: parent.left - leftMargin: (parent.width - banner.width) / 2 + leftMargin: (parent.width - root.bannerWidth) / 2 } HifiControlsUit.Button { diff --git a/interface/resources/qml/OverlayLoginDialog.qml b/interface/resources/qml/OverlayLoginDialog.qml index b9ae869b1e..76f0cfa8de 100644 --- a/interface/resources/qml/OverlayLoginDialog.qml +++ b/interface/resources/qml/OverlayLoginDialog.qml @@ -36,6 +36,8 @@ FocusScope { property string title: "" property int titleWidth: 0 property alias text: loginKeyboard.mirroredText + property alias bannerWidth: banner.width + property alias bannerHeight: banner.height function tryDestroy() { root.destroy() @@ -51,10 +53,36 @@ FocusScope { } Image { + z: -10 id: loginDialogBackground source: "LoginDialog/background.jpg" anchors.fill: parent - z: -2 + } + + Rectangle { + z: -6 + id: opaqueRect + height: parent.height + width: parent.width + opacity: 0.5 + color: "black" + } + + Item { + z: -5 + id: bannerContainer + width: parent.width + height: banner.height + anchors { + top: parent.top + topMargin: 0.18 * parent.height + } + Image { + id: banner + anchors.centerIn: parent + source: "../images/high-fidelity-banner.svg" + horizontalAlignment: Image.AlignHCenter + } } Timer { diff --git a/interface/resources/qml/dialogs/TabletLoginDialog.qml b/interface/resources/qml/dialogs/TabletLoginDialog.qml index 0012d88f55..c1d7a07ba1 100644 --- a/interface/resources/qml/dialogs/TabletLoginDialog.qml +++ b/interface/resources/qml/dialogs/TabletLoginDialog.qml @@ -39,6 +39,8 @@ FocusScope { property alias text: loginKeyboard.mirroredText property int titleWidth: 0 + property alias bannerWidth: banner.width + property alias bannerHeight: banner.height property string iconText: hifi.glyphs.avatar property int iconSize: 35 @@ -90,10 +92,36 @@ FocusScope { } Image { + z: -10 id: loginDialogBackground source: "../LoginDialog/background_tablet.jpg" anchors.fill: parent - z: -2 + } + + Item { + z: -5 + id: bannerContainer + width: parent.width + height: banner.height + anchors { + top: parent.top + topMargin: 0.18 * parent.height + } + Image { + id: banner + anchors.centerIn: parent + source: "../../images/high-fidelity-banner.svg" + horizontalAlignment: Image.AlignHCenter + } + } + + Rectangle { + z: -6 + id: opaqueRect + height: parent.height + width: parent.width + opacity: 0.5 + color: "black" } HifiControlsUit.Keyboard {