fixing code for max height/width

This commit is contained in:
Wayne Chen 2018-12-09 07:56:09 -08:00
parent 7ab1d649f1
commit 3c4382773a
5 changed files with 10 additions and 10 deletions

View file

@ -39,8 +39,8 @@ Item {
property int maxHeight: root.height
function resize() {
maxWidth = root.isTablet ? 1280 : root.width;
maxHeight = root.isTablet ? 720 : root.height;
maxWidth = root.width;
maxHeight = root.height;
if (root.isTablet === false) {
var targetWidth = Math.max(Math.max(titleWidth, Math.max(additionalTextContainer.contentWidth,
termsContainer.contentWidth)), mainContainer.width)

View file

@ -51,8 +51,8 @@ Item {
property int maxHeight: root.height
function resize() {
maxWidth = root.isTablet ? 1280 : root.width;
maxHeight = root.isTablet ? 720 : root.height;
maxWidth = root.width;
maxHeight = root.height;
var targetWidth = Math.max(titleWidth, mainContainer.width);
var targetHeight = hifi.dimensions.contentSpacing.y + mainContainer.height + 4 * hifi.dimensions.contentSpacing.y;

View file

@ -38,8 +38,8 @@ Item {
property int maxHeight: root.height
function resize() {
maxWidth = root.isTablet ? 1280 : root.width;
maxHeight = root.isTablet ? 720 : root.height;
maxWidth = root.width;
maxHeight = root.height;
var targetWidth = Math.max(titleWidth, mainContainer.width);
var targetHeight = hifi.dimensions.contentSpacing.y + mainContainer.height +
4 * hifi.dimensions.contentSpacing.y;

View file

@ -49,8 +49,8 @@ Item {
property int maxHeight: root.height
function resize() {
maxWidth = root.isTablet ? 1280 : root.width;
maxHeight = root.isTablet ? 720 : root.height;
maxWidth = root.width;
maxHeight = root.height;
var targetWidth = Math.max(titleWidth, mainContainer.width);
var targetHeight = hifi.dimensions.contentSpacing.y + mainContainer.height +
4 * hifi.dimensions.contentSpacing.y;

View file

@ -49,8 +49,8 @@ Item {
property int maxHeight: root.height
function resize() {
maxWidth = root.isTablet ? 1280 : root.width;
maxHeight = root.isTablet ? 720 : root.height;
maxWidth = root.width;
maxHeight = root.height;
var targetWidth = Math.max(titleWidth, mainContainer.width);
var targetHeight = mainTextContainer.height +
hifi.dimensions.contentSpacing.y + textField.height +