qml keyboard for Browser window

This commit is contained in:
Seth Alves 2016-09-14 10:38:08 -07:00
parent 447de7cd5a
commit 409ebe526b

View file

@ -6,6 +6,7 @@ import "controls-uit"
import "styles" as HifiStyles
import "styles-uit"
import "windows"
import "controls" as Controls
ScrollingWindow {
id: root
@ -52,6 +53,9 @@ ScrollingWindow {
width: pane.contentWidth
implicitHeight: pane.scrollHeight
property bool keyboardRaised: false
property bool punctuationMode: false
Row {
id: buttons
spacing: 4
@ -202,7 +206,7 @@ ScrollingWindow {
url: "https://highfidelity.com"
anchors.top: buttons.bottom
anchors.topMargin: 8
anchors.bottom: parent.bottom
anchors.bottom: keyboard1.top
anchors.left: parent.left
anchors.right: parent.right
onFeaturePermissionRequested: {
@ -234,6 +238,37 @@ ScrollingWindow {
profile: desktop.browserProfile
}
// virtual keyboard, letters
Controls.Keyboard {
id: keyboard1
// y: parent.keyboardRaised ? parent.height : 0
height: parent.keyboardRaised ? 200 : 0
visible: parent.keyboardRaised && !parent.punctuationMode
enabled: parent.keyboardRaised && !parent.punctuationMode
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
// anchors.bottomMargin: 2 * hifi.dimensions.contentSpacing.y
}
Controls.KeyboardPunctuation {
id: keyboard2
// y: parent.keyboardRaised ? parent.height : 0
height: parent.keyboardRaised ? 200 : 0
visible: parent.keyboardRaised && parent.punctuationMode
enabled: parent.keyboardRaised && parent.punctuationMode
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
// anchors.bottomMargin: 2 * hifi.dimensions.contentSpacing.y
}
} // item