mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
qml keyboard for browsable preferences
This commit is contained in:
parent
753e4c4c7b
commit
161424afaf
1 changed files with 38 additions and 2 deletions
|
@ -12,12 +12,17 @@ import QtQuick 2.5
|
||||||
|
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import "../../controls-uit"
|
import "../../controls-uit"
|
||||||
|
import "../../controls" as Controls
|
||||||
|
|
||||||
|
|
||||||
Preference {
|
Preference {
|
||||||
id: root
|
id: root
|
||||||
property alias text: dataTextField.text
|
property alias text: dataTextField.text
|
||||||
property alias placeholderText: dataTextField.placeholderText
|
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: {
|
Component.onCompleted: {
|
||||||
dataTextField.text = preference.value;
|
dataTextField.text = preference.value;
|
||||||
|
@ -33,7 +38,7 @@ Preference {
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: keyboard1.top
|
||||||
}
|
}
|
||||||
height: Math.max(dataTextField.controlHeight, button.height)
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue