From 24b89275f2b3f8406abf2d55aa998d0dafca8992 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 5 Apr 2017 18:00:43 +0100 Subject: [PATCH 1/3] 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 + } } } From de8b7eeb27ae691e3b867334329c7ef1d25a40b5 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 5 Apr 2017 18:02:55 +0100 Subject: [PATCH 2/3] removed commented code --- interface/resources/qml/hifi/tablet/NewModelDialog.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/resources/qml/hifi/tablet/NewModelDialog.qml b/interface/resources/qml/hifi/tablet/NewModelDialog.qml index e7a07bfb9f..efc030cbcb 100644 --- a/interface/resources/qml/hifi/tablet/NewModelDialog.qml +++ b/interface/resources/qml/hifi/tablet/NewModelDialog.qml @@ -36,7 +36,6 @@ Rectangle { anchors.left: parent.left anchors.right: parent.right anchors.bottom: keyboard.top - // spacing: 5 Text { id: text1 From 34f3c4abee6bfbf6af3126fb5bdec14ea4af3a1e Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 5 Apr 2017 18:08:03 +0100 Subject: [PATCH 3/3] removed mousearea --- interface/resources/qml/hifi/tablet/NewModelDialog.qml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/NewModelDialog.qml b/interface/resources/qml/hifi/tablet/NewModelDialog.qml index efc030cbcb..5dbb733872 100644 --- a/interface/resources/qml/hifi/tablet/NewModelDialog.qml +++ b/interface/resources/qml/hifi/tablet/NewModelDialog.qml @@ -184,15 +184,6 @@ Rectangle { } } } - MouseArea { - id: modelMouse - anchors.fill: parent - propagateComposedEvents: true - onClicked: { - newModelDialog.keyboardEnabled = false; - mouse.accepted = false; - } - } } Keyboard {