changing opacity to 0.5

This commit is contained in:
Wayne Chen 2018-12-05 10:16:48 -08:00
parent 37beab3ab3
commit eb51a5b7b6
9 changed files with 102 additions and 111 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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