Test Tablet keyboard specific

This commit is contained in:
vladest 2017-10-02 20:02:55 +02:00
parent 07ba2cce5b
commit bf39eb9a77
3 changed files with 29 additions and 8 deletions

View file

@ -27,6 +27,8 @@ ModalWindow {
destroyOnHidden: true
visible: true
readonly property bool isTablet: false
property string iconText: ""
property int iconSize: 50

View file

@ -244,12 +244,17 @@ Item {
}
}
Component.onCompleted: {
root.title = qsTr("Sign Into High Fidelity")
root.iconText = "<"
keyboardEnabled = HMD.active;
//dont rise local keyboard
keyboardEnabled = !root.isTablet && HMD.active;
//but rise Tablet's one instead for Tablet interface
if (root.isTablet) {
root.keyboardEnabled = HMD.active;
root.keyboardRaised = Qt.binding( function() { return keyboardRaised; })
}
//d.resize();
if (failAfterSignUp) {

View file

@ -32,8 +32,14 @@ TabletModalWindow {
//fake root for shared components expecting root here
property var root: QtObject {
id: root
property alias title: realRoot.title
property bool keyboardEnabled: false
property bool keyboardRaised: false
property bool punctuationMode: false
readonly property bool isTablet: true
property alias title: realRoot.title
property real width: realRoot.width
property real height: realRoot.height
@ -65,10 +71,6 @@ TabletModalWindow {
//onTitleWidthChanged: d.resize();
property bool keyboardEnabled: false
property bool keyboardRaised: false
property bool punctuationMode: false
//onKeyboardRaisedChanged: d.resize();
signal canceled();
@ -123,6 +125,18 @@ TabletModalWindow {
}
}
Keyboard {
raised: root.keyboardEnabled && root.keyboardRaised
numeric: root.punctuationMode
enabled: true
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
bottomMargin: root.keyboardRaised ? 2 * hifi.dimensions.contentSpacing.y : 0
}
}
Keys.onPressed: {
if (!visible) {
return