fix resizing of LoginDialog and friends

This commit is contained in:
Stephen Birarda 2016-12-12 11:31:26 -08:00
parent 691ce4312e
commit a0663bdf31
7 changed files with 20 additions and 22 deletions

View file

@ -40,7 +40,6 @@ ModalWindow {
Loader {
id: bodyLoader
anchors.fill: parent
source: loginDialog.isSteamRunning() ? "LoginDialog/SignInBody.qml" : "LoginDialog/LinkAccountBody.qml"
}
}

View file

@ -18,8 +18,8 @@ import "../styles-uit"
Item {
id: completeProfileBody
clip: true
width: pane.width
height: pane.height
width: root.pane.width
height: root.pane.height
QtObject {
id: d
@ -33,8 +33,8 @@ Item {
termsContainer.contentWidth))
var targetHeight = 5 * hifi.dimensions.contentSpacing.y + buttons.height + additionalTextContainer.height + termsContainer.height
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
}
}

View file

@ -19,9 +19,8 @@ import "../styles-uit"
Item {
id: linkAccountBody
clip: true
width: root.pane.width
height: root.pane.height
width: root.pane.width
property bool failAfterSignUp: false
function login() {
@ -54,8 +53,8 @@ Item {
targetHeight += hifi.dimensions.contentSpacing.y + additionalInformation.height
}
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y);
}
}

View file

@ -18,8 +18,8 @@ import "../styles-uit"
Item {
id: signInBody
clip: true
width: pane.width
height: pane.height
width: root.pane.width
height: root.pane.height
property bool required: false
@ -43,8 +43,8 @@ Item {
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
}
}

View file

@ -19,8 +19,8 @@ import "../styles-uit"
Item {
id: signupBody
clip: true
width: root.pane.width
height: root.pane.height
width: root.pane.width
function signup() {
mainTextContainer.visible = false
@ -47,8 +47,8 @@ Item {
4 * hifi.dimensions.contentSpacing.y + form.height +
hifi.dimensions.contentSpacing.y + buttons.height;
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : 0);
}
}

View file

@ -47,8 +47,8 @@ Item {
hifi.dimensions.contentSpacing.y + textField.height +
hifi.dimensions.contentSpacing.y + buttons.height
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y)
}
}

View file

@ -17,8 +17,8 @@ import "../styles-uit"
Item {
id: welcomeBody
clip: true
width: pane.width
height: pane.height
width: root.pane.width
height: root.pane.height
property bool welcomeBack: false
@ -39,8 +39,8 @@ Item {
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
}
}