testing tablet implementation

This commit is contained in:
Wayne Chen 2018-10-30 11:48:22 -07:00
parent 8e4837f8c8
commit 43b269b612
3 changed files with 32 additions and 62 deletions

View file

@ -17,51 +17,40 @@ import "../windows" as Windows
import "../LoginDialog"
Windows.TabletModalWindow {
id: realRoot
FocusScope {
id: root
objectName: "LoginDialog"
visible: true
anchors.fill: parent
signal sendToScript(var message);
property bool isHMD: false
property bool gotoPreviousApp: false;
color: hifi.colors.baseGray
title: qsTr("Sign in to High Fidelity")
property alias titleWidth: root.titleWidth
property alias punctuationMode: root.punctuationMode
//fake root for shared components expecting root here
property var root: QtObject {
id: root
property bool keyboardEnabled: false
property bool keyboardRaised: false
property bool punctuationMode: false
property bool isPassword: false
property alias text: loginKeyboard.mirroredText
property bool keyboardEnabled: false
property bool keyboardRaised: false
property bool punctuationMode: false
property bool isPassword: false
property alias text: loginKeyboard.mirroredText
readonly property bool isTablet: true
readonly property bool isTablet: true
property int titleWidth: 0
property string iconText: hifi.glyphs.avatar
property int iconSize: 35
property alias title: realRoot.title
property real width: realRoot.width
property real height: realRoot.height
property var pane: QtObject {
property real width: root.width
property real height: root.height
}
property int titleWidth: 0
property string iconText: hifi.glyphs.avatar
property int iconSize: 35
property var pane: QtObject {
property real width: root.width
property real height: root.height
}
function tryDestroy() {
canceled()
}
function tryDestroy() {
canceled()
}
MouseArea {
width: realRoot.width
height: realRoot.height
width: root.width
height: root.height
}
property bool keyboardOverride: true
@ -75,32 +64,13 @@ Windows.TabletModalWindow {
HifiStylesUit.HifiConstants { id: hifi }
Item {
id: mfRoot
readonly property int frameMarginTop: hifi.dimensions.modalDialogMargin.y
readonly property int frameMarginTop: hifi.dimensions.modalDialogMargin.y
width: root.width
height: root.height + frameMarginTop + hifi.dimensions.contentMargin.x
LoginDialog {
id: loginDialog
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
LoginDialog {
id: loginDialog
anchors {
fill: parent
topMargin: parent.frameMarginTop
horizontalCenter: parent.horizontalCenter
}
Loader {
id: bodyLoader
anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
}
Loader {
id: bodyLoader
}
}
@ -110,9 +80,9 @@ Windows.TabletModalWindow {
numeric: root.punctuationMode
password: root.isPassword
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
left: bodyLoader.left
right: bodyLoader.right
top: bodyLoader.bottom
}
}
@ -138,7 +108,6 @@ Windows.TabletModalWindow {
}
break
} else switch (event.key) {
case Qt.Key_Enter:
case Qt.Key_Return:
event.accepted = true

View file

@ -29,7 +29,6 @@
#include "avatar/AvatarManager.h"
#include "scripting/HMDScriptingInterface.h"
#include "ui/overlays/Overlays.h"
#include "ui/overlays/Web3DOverlay.h"
#include "Constants.h"
HIFI_QML_DEF(LoginDialog)
@ -75,8 +74,8 @@ void LoginDialog::showWithSelection() {
} else {
tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
}
}
if (!hmd->getShouldShowTablet()) {
hmd->openTablet();
}

View file

@ -17,6 +17,8 @@
#include <OffscreenQmlDialog.h>
#include <SettingHandle.h>
#include "ui/overlays/Web3DOverlay.h"
class QNetworkReply;
class Web3DOverlay;