mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:56:25 +02:00
fix resizing for keyboard changes in body loaded qml
This commit is contained in:
parent
f0f10d837c
commit
691ce4312e
5 changed files with 10 additions and 12 deletions
|
@ -33,8 +33,8 @@ Item {
|
||||||
termsContainer.contentWidth))
|
termsContainer.contentWidth))
|
||||||
var targetHeight = 5 * hifi.dimensions.contentSpacing.y + buttons.height + additionalTextContainer.height + termsContainer.height
|
var targetHeight = 5 * hifi.dimensions.contentSpacing.y + buttons.height + additionalTextContainer.height + termsContainer.height
|
||||||
|
|
||||||
root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ Item {
|
||||||
targetHeight += hifi.dimensions.contentSpacing.y + additionalInformation.height
|
targetHeight += hifi.dimensions.contentSpacing.y + additionalInformation.height
|
||||||
}
|
}
|
||||||
|
|
||||||
root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
|
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
|
||||||
root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y);
|
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,8 @@ Item {
|
||||||
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
|
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
|
||||||
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
|
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
|
||||||
|
|
||||||
root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,9 @@ Item {
|
||||||
hifi.dimensions.contentSpacing.y + textField.height +
|
hifi.dimensions.contentSpacing.y + textField.height +
|
||||||
hifi.dimensions.contentSpacing.y + buttons.height
|
hifi.dimensions.contentSpacing.y + buttons.height
|
||||||
|
|
||||||
root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y)
|
+ (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y)
|
||||||
|
|
||||||
height = root.height
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ Item {
|
||||||
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
|
var targetWidth = Math.max(titleWidth, mainTextContainer.contentWidth)
|
||||||
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
|
var targetHeight = mainTextContainer.height + 3 * hifi.dimensions.contentSpacing.y + buttons.height
|
||||||
|
|
||||||
root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue