Login dialog polish

This commit is contained in:
Brad Davis 2016-01-24 13:32:55 -08:00
parent ab133f37a0
commit 8ed5ea8605

View file

@ -70,6 +70,7 @@ Window {
source: "../images/login-username.svg" source: "../images/login-username.svg"
width: loginDialog.inputHeight * 0.65 width: loginDialog.inputHeight * 0.65
height: width height: width
sourceSize: Qt.size(width, height);
anchors { anchors {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left left: parent.left
@ -103,6 +104,7 @@ Window {
source: "../images/login-password.svg" source: "../images/login-password.svg"
width: loginDialog.inputHeight * 0.65 width: loginDialog.inputHeight * 0.65
height: width height: width
sourceSize: Qt.size(width, height);
anchors { anchors {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left left: parent.left
@ -215,67 +217,53 @@ Window {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: "PointingHandCursor" cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
loginDialog.login(username.text, password.text) loginDialog.login(username.text, password.text)
} }
} }
} }
Row { Item {
anchors.horizontalCenter: parent.horizontalCenter anchors { left: parent.left; right: parent.right; }
height: loginDialog.inputHeight
Image {
id: hifiIcon
source: "../images/hifi-logo-blackish.svg"
width: loginDialog.inputHeight
height: width
sourceSize: Qt.size(width, height);
anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.horizontalCenter }
}
Text { Text {
anchors { verticalCenter: parent.verticalCenter; right: hifiIcon.left; margins: loginDialog.inputSpacing }
text: "Password?" text: "Password?"
font.pixelSize: hifi.fonts.pixelSize * 0.8 scale: 0.8
font.underline: true font.underline: true
color: "#e0e0e0" color: "#e0e0e0"
width: loginDialog.inputHeight * 4
horizontalAlignment: Text.AlignRight
anchors.verticalCenter: parent.verticalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors { fill: parent; margins: -loginDialog.inputSpacing / 2 }
cursorShape: "PointingHandCursor" cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: loginDialog.openUrl(loginDialog.rootUrl + "/users/password/new")
loginDialog.openUrl(loginDialog.rootUrl + "/users/password/new")
}
}
}
Item {
width: loginDialog.inputHeight + loginDialog.inputSpacing * 2
height: loginDialog.inputHeight
Image {
id: hifiIcon
source: "../images/hifi-logo-blackish.svg"
width: loginDialog.inputHeight
height: width
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
} }
} }
Text { Text {
anchors { verticalCenter: parent.verticalCenter; left: hifiIcon.right; margins: loginDialog.inputSpacing }
text: "Register" text: "Register"
font.pixelSize: hifi.fonts.pixelSize * 0.8 scale: 0.8
font.underline: true font.underline: true
color: "#e0e0e0" color: "#e0e0e0"
width: loginDialog.inputHeight * 4
horizontalAlignment: Text.AlignLeft
anchors.verticalCenter: parent.verticalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors { fill: parent; margins: -loginDialog.inputSpacing / 2 }
cursorShape: "PointingHandCursor" cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: loginDialog.openUrl(loginDialog.rootUrl + "/signup")
loginDialog.openUrl(loginDialog.rootUrl + "/signup")
}
} }
} }
} }
} }
} }