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