From 161424afaf7164abfd5501b21c60ead6e3a787e0 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 12 Sep 2016 21:39:52 -0700 Subject: [PATCH] qml keyboard for browsable preferences --- .../preferences/BrowsablePreference.qml | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml b/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml index 2cf50891c9..2e5ea7578c 100644 --- a/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml +++ b/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml @@ -12,12 +12,17 @@ import QtQuick 2.5 import "../../dialogs" import "../../controls-uit" +import "../../controls" as Controls + Preference { id: root property alias text: dataTextField.text property alias placeholderText: dataTextField.placeholderText - height: control.height + hifi.dimensions.controlInterlineHeight + height: control.height + hifi.dimensions.controlInterlineHeight + (keyboardRaised ? 200 : 0) + + property bool keyboardRaised: false + property bool punctuationMode: false Component.onCompleted: { dataTextField.text = preference.value; @@ -33,7 +38,7 @@ Preference { anchors { left: parent.left right: parent.right - bottom: parent.bottom + bottom: keyboard1.top } height: Math.max(dataTextField.controlHeight, button.height) @@ -76,4 +81,35 @@ Preference { } } } + + // 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 + } }