From 24b89275f2b3f8406abf2d55aa998d0dafca8992 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 5 Apr 2017 18:00:43 +0100 Subject: [PATCH] fix new model dialog textInput --- .../qml/hifi/tablet/NewModelDialog.qml | 57 ++++++++++++++++++- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/NewModelDialog.qml b/interface/resources/qml/hifi/tablet/NewModelDialog.qml index 2fa48cac07..e7a07bfb9f 100644 --- a/interface/resources/qml/hifi/tablet/NewModelDialog.qml +++ b/interface/resources/qml/hifi/tablet/NewModelDialog.qml @@ -22,15 +22,21 @@ Rectangle { color: hifi.colors.baseGray; property var eventBridge; signal sendToScript(var message); + property bool keyboardEnabled: false + property bool punctuationMode: false + property bool keyboardRasied: false - Column { + Item { id: column1 anchors.rightMargin: 10 anchors.leftMargin: 10 anchors.bottomMargin: 10 anchors.topMargin: 10 - anchors.fill: parent - spacing: 5 + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: keyboard.top + // spacing: 5 Text { id: text1 @@ -43,17 +49,42 @@ Rectangle { id: modelURL height: 20 text: qsTr("") + color: "white" + anchors.top: text1.bottom + anchors.topMargin: 5 anchors.left: parent.left anchors.leftMargin: 0 anchors.right: parent.right anchors.rightMargin: 0 font.pixelSize: 12 + + onAccepted: { + newModelDialog.keyboardEnabled = false; + } + + MouseArea { + anchors.fill: parent + onClicked: { + newModelDialog.keyboardEnabled = HMD.active + parent.focus = true; + parent.forceActiveFocus() + } + } + } + + Rectangle { + id: textInputBox + color: "white" + anchors.fill: modelURL + opacity: 0.1 } Row { id: row1 height: 400 spacing: 30 + anchors.top: modelURL.top + anchors.topMargin: 25 anchors.left: parent.left anchors.leftMargin: 0 anchors.right: parent.right @@ -154,5 +185,25 @@ Rectangle { } } } + MouseArea { + id: modelMouse + anchors.fill: parent + propagateComposedEvents: true + onClicked: { + newModelDialog.keyboardEnabled = false; + mouse.accepted = false; + } + } + } + + Keyboard { + id: keyboard + raised: parent.keyboardEnabled + numeric: parent.punctuationMode + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + } } }