mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 13:28:16 +02:00
Domain login display working correctly.
This commit is contained in:
parent
8f55e13aa2
commit
d81ec3a4b8
1 changed files with 29 additions and 36 deletions
|
@ -106,15 +106,15 @@ Item {
|
||||||
loginErrorMessage.wrapMode = Text.WordWrap;
|
loginErrorMessage.wrapMode = Text.WordWrap;
|
||||||
errorContainer.height = (loginErrorMessageTextMetrics.width / displayNameField.width) * loginErrorMessageTextMetrics.height;
|
errorContainer.height = (loginErrorMessageTextMetrics.width / displayNameField.width) * loginErrorMessageTextMetrics.height;
|
||||||
}
|
}
|
||||||
var domainLoginText = "Log In to Domain: " + domainLoginDomain;
|
var domainLoginText = "Log In to Domain\n" + domainLoginDomain;
|
||||||
loginDialogText.text = (!isLoggingInToDomain) ? "Log In to Metaverse" : domainLoginText;
|
loginDialogText.text = (!isLoggingInToDomain) ? "Log In to Metaverse (Not Required)" : domainLoginText;
|
||||||
loginButton.text = (!linkAccountBody.linkSteam && !linkAccountBody.linkOculus) ? "Log In" : "Link Account";
|
loginButton.text = (!linkAccountBody.linkSteam && !linkAccountBody.linkOculus) ? "Log In" : "Link Account";
|
||||||
loginButton.text = (!isLoggingInToDomain) ? "Log In to Metaverse" : "Log In to Domain";
|
loginButton.text = (!isLoggingInToDomain) ? "Log In to Metaverse" : "Log In to Domain";
|
||||||
loginButton.color = hifi.buttons.blue;
|
loginButton.color = hifi.buttons.blue;
|
||||||
displayNameField.placeholderText = "Display Name (optional)";
|
displayNameField.placeholderText = "Display Name (optional)";
|
||||||
var savedDisplayName = Settings.getValue("Avatar/displayName", "");
|
var savedDisplayName = Settings.getValue("Avatar/displayName", "");
|
||||||
displayNameField.text = savedDisplayName;
|
displayNameField.text = savedDisplayName;
|
||||||
emailField.placeholderText = "Username or Email";
|
emailField.placeholderText = (!isLoggingInToDomain) ? "Username or Email" : "Username";
|
||||||
if (!isLoggingInToDomain) {
|
if (!isLoggingInToDomain) {
|
||||||
var savedUsername = Settings.getValue("keepMeLoggedIn/savedUsername", "");
|
var savedUsername = Settings.getValue("keepMeLoggedIn/savedUsername", "");
|
||||||
emailField.text = keepMeLoggedInCheckbox.checked ? savedUsername === "Unknown user" ? "" : savedUsername : "";
|
emailField.text = keepMeLoggedInCheckbox.checked ? savedUsername === "Unknown user" ? "" : savedUsername : "";
|
||||||
|
@ -161,9 +161,9 @@ Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: loginErrorMessageTextMetrics.height
|
height: loginErrorMessageTextMetrics.height
|
||||||
anchors {
|
anchors {
|
||||||
bottom: loginDialogText.top;
|
bottom: loginDialogTextContainer.top;
|
||||||
bottomMargin: hifi.dimensions.contentSpacing.y;
|
bottomMargin: hifi.dimensions.contentSpacing.y;
|
||||||
left: loginDialogText.left;
|
left: loginDialogTextContainer.left;
|
||||||
}
|
}
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: loginErrorMessageTextMetrics
|
id: loginErrorMessageTextMetrics
|
||||||
|
@ -183,21 +183,33 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Item {
|
||||||
id: loginDialogText
|
id: loginDialogTextContainer
|
||||||
text: qsTr("Log In")
|
height: 56
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
topMargin: errorContainer.height
|
right: parent.right;
|
||||||
|
topMargin: 1.5 * hifi.dimensions.contentSpacing.y
|
||||||
|
// horizontalCenter: mainContainer.horizontalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: loginDialogText
|
||||||
|
text: qsTr("Log In")
|
||||||
|
lineHeight: 1
|
||||||
|
color: "white"
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
font.family: linkAccountBody.fontFamily
|
||||||
|
font.pixelSize: 24
|
||||||
|
font.bold: linkAccountBody.fontBold
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
lineHeight: 1
|
|
||||||
color: "white"
|
|
||||||
font.family: linkAccountBody.fontFamily
|
|
||||||
font.pixelSize: linkAccountBody.textFieldFontSize
|
|
||||||
font.bold: linkAccountBody.fontBold
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControlsUit.TextField {
|
HifiControlsUit.TextField {
|
||||||
|
@ -207,7 +219,7 @@ Item {
|
||||||
font.pixelSize: linkAccountBody.textFieldFontSize
|
font.pixelSize: linkAccountBody.textFieldFontSize
|
||||||
styleRenderType: Text.QtRendering
|
styleRenderType: Text.QtRendering
|
||||||
anchors {
|
anchors {
|
||||||
top: loginDialogText.bottom
|
top: loginDialogTextContainer.bottom
|
||||||
topMargin: 1.5 * hifi.dimensions.contentSpacing.y
|
topMargin: 1.5 * hifi.dimensions.contentSpacing.y
|
||||||
}
|
}
|
||||||
placeholderText: "Display Name (optional)"
|
placeholderText: "Display Name (optional)"
|
||||||
|
@ -647,25 +659,6 @@ Item {
|
||||||
root.tryDestroy();
|
root.tryDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
id: loginSkipTipText
|
|
||||||
text: qsTr("Not all domains require you to have a metaverse account. \n Some domains have their own login dialogs.")
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
visible: !linkAccountBody.isLoggingInToDomain
|
|
||||||
anchors {
|
|
||||||
top: dismissButton.bottom
|
|
||||||
topMargin: hifi.dimensions.contentSpacing.y
|
|
||||||
left: parent.left
|
|
||||||
}
|
|
||||||
lineHeight: 1
|
|
||||||
color: "white"
|
|
||||||
font.family: linkAccountBody.fontFamily
|
|
||||||
font.pixelSize: linkAccountBody.textFieldFontSize
|
|
||||||
font.bold: linkAccountBody.fontBold
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue