From 5c549309105b832443e4e9ad865505b80959cfe2 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 15 Jan 2019 10:02:00 -0800 Subject: [PATCH] adding tablet close upon login --- .../resources/qml/LoginDialog/LoggingInBody.qml | 1 - .../resources/qml/dialogs/TabletLoginDialog.qml | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LoggingInBody.qml b/interface/resources/qml/LoginDialog/LoggingInBody.qml index f89e6fae2b..d259da7c1c 100644 --- a/interface/resources/qml/LoginDialog/LoggingInBody.qml +++ b/interface/resources/qml/LoginDialog/LoggingInBody.qml @@ -279,7 +279,6 @@ Item { "withOculus": loggingInBody.withOculus, "errorString": errorString }); } else if (loggingInBody.withOculus) { errorString = "Your Oculus authentication has failed. Please make sure you are logged into Oculus and try again." - console.log("loggingInBody- withOculus: " + loggingInBody.withOculus); bodyLoader.setSource("CompleteProfileBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": loggingInBody.withSteam, "withOculus": loggingInBody.withOculus, "errorString": errorString }); } else { diff --git a/interface/resources/qml/dialogs/TabletLoginDialog.qml b/interface/resources/qml/dialogs/TabletLoginDialog.qml index 7bffcbe75c..06844c848a 100644 --- a/interface/resources/qml/dialogs/TabletLoginDialog.qml +++ b/interface/resources/qml/dialogs/TabletLoginDialog.qml @@ -14,6 +14,8 @@ import QtQuick 2.5 import controlsUit 1.0 as HifiControlsUit import stylesUit 1.0 as HifiStylesUit +import TabletScriptingInterface 1.0 + import "../LoginDialog" FocusScope { @@ -25,8 +27,7 @@ FocusScope { width: parent.width height: parent.height - signal sendToScript(var message); - signal canceled(); + property var tabletProxy: Tablet.getTablet("com.highfidelity.interface.tablet.system"); property bool isHMD: false property bool gotoPreviousApp: false; @@ -52,6 +53,7 @@ FocusScope { } function tryDestroy() { + tabletProxy.gotoHomeScreen(); } MouseArea { @@ -76,7 +78,7 @@ FocusScope { interval: 200 onTriggered: { - if (MenuInterface.isOptionChecked("Use 3D Keyboard")) { + if (MenuInterface.isOptionChecked("Use 3D Keyboard") && HMD.active) { KeyboardScriptingInterface.raised = true; } } @@ -168,7 +170,9 @@ FocusScope { Component.onDestruction: { loginKeyboard.raised = false; - KeyboardScriptingInterface.raised = false; + if (HMD.active) { + KeyboardScriptingInterface.raised = false; + } } Component.onCompleted: {