From 7ab1d649f1f0051959ae92a9fdf4c88edb817937 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Sun, 9 Dec 2018 07:49:48 -0800 Subject: [PATCH 1/2] fixing limit for overlay too far/close --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 42fd7806f9..c60bab743f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -8687,7 +8687,7 @@ void Application::updateLoginDialogOverlayPosition() { auto newOverlayPositionVec = (cameraPositionVec + offset) + (upVec * -0.1f); auto newOverlayOrientation = glm::inverse(glm::quat_cast(glm::lookAt(newOverlayPositionVec, cameraPositionVec, upVec))) * Quaternions::Y_180; - bool overlayOutOfBounds = glm::distance(overlayPositionVec, cameraPositionVec) > 0.5f; + bool overlayOutOfBounds = glm::distance(overlayPositionVec, cameraPositionVec) > 1.0f; if (pointAngle > LOOK_AWAY_THRESHOLD_ANGLE || overlayOutOfBounds) { QVariantMap properties { From 3c4382773a142cf7613b76404b62f9b6aa23fa81 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Sun, 9 Dec 2018 07:56:09 -0800 Subject: [PATCH 2/2] fixing code for max height/width --- interface/resources/qml/LoginDialog/CompleteProfileBody.qml | 4 ++-- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- interface/resources/qml/LoginDialog/LoggingInBody.qml | 4 ++-- interface/resources/qml/LoginDialog/SignUpBody.qml | 4 ++-- interface/resources/qml/LoginDialog/UsernameCollisionBody.qml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml index 0a5500dfed..994bdae518 100644 --- a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml +++ b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml @@ -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) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 865470c481..37912700b7 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -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; diff --git a/interface/resources/qml/LoginDialog/LoggingInBody.qml b/interface/resources/qml/LoginDialog/LoggingInBody.qml index 5239195793..b2d549136f 100644 --- a/interface/resources/qml/LoginDialog/LoggingInBody.qml +++ b/interface/resources/qml/LoginDialog/LoggingInBody.qml @@ -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; diff --git a/interface/resources/qml/LoginDialog/SignUpBody.qml b/interface/resources/qml/LoginDialog/SignUpBody.qml index 12eadbe651..a903e4557d 100644 --- a/interface/resources/qml/LoginDialog/SignUpBody.qml +++ b/interface/resources/qml/LoginDialog/SignUpBody.qml @@ -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; diff --git a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml index 621bcbc484..8e56659eed 100644 --- a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml +++ b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml @@ -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 +