mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
qml keyboard for file dialog
This commit is contained in:
parent
3e86b2f0f2
commit
b841e3094d
1 changed files with 38 additions and 2 deletions
|
@ -19,6 +19,7 @@ import ".."
|
|||
import "../controls-uit"
|
||||
import "../styles-uit"
|
||||
import "../windows"
|
||||
import "../controls" as Controls
|
||||
|
||||
import "fileDialog"
|
||||
|
||||
|
@ -27,7 +28,7 @@ ModalWindow {
|
|||
id: root
|
||||
resizable: true
|
||||
implicitWidth: 480
|
||||
implicitHeight: 360
|
||||
implicitHeight: 360 + (fileDialogItem.keyboardRaised ? 200 + (2 * hifi.dimensions.contentSpacing.y) : 0)
|
||||
|
||||
minSize: Qt.vector2d(360, 240)
|
||||
draggable: true
|
||||
|
@ -100,11 +101,16 @@ ModalWindow {
|
|||
}
|
||||
|
||||
Item {
|
||||
id: fileDialogItem
|
||||
clip: true
|
||||
width: pane.width
|
||||
height: pane.height
|
||||
anchors.margins: 0
|
||||
|
||||
property bool keyboardRaised: false
|
||||
property bool punctuationMode: false
|
||||
|
||||
|
||||
MouseArea {
|
||||
// Clear selection when click on internal unused area.
|
||||
anchors.fill: parent
|
||||
|
@ -619,7 +625,7 @@ ModalWindow {
|
|||
left: parent.left
|
||||
right: selectionType.visible ? selectionType.left: parent.right
|
||||
rightMargin: selectionType.visible ? hifi.dimensions.contentSpacing.x : 0
|
||||
bottom: buttonRow.top
|
||||
bottom: keyboard1.top
|
||||
bottomMargin: hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
readOnly: !root.saveDialog
|
||||
|
@ -640,6 +646,36 @@ ModalWindow {
|
|||
KeyNavigation.right: openButton
|
||||
}
|
||||
|
||||
|
||||
// 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: buttonRow.top
|
||||
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: buttonRow.top
|
||||
anchors.bottomMargin: 2 * hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttonRow
|
||||
anchors {
|
||||
|
|
Loading…
Reference in a new issue