aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2017-01-11 00:11:00 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-01-30 10:51:15 +0000
commitad44e00c0d01dea15358b98865623e8f11f295a8 (patch)
treeb3f61fa370e95cd58a0e3cbd9be2de03287c6d9b /examples
parent3076d61bc6a8462559162ac4a529ab6a9ec183c4 (diff)
Add full screen input mode for super wide screens
In full screen mode the virtual keyboard replicates the contents of the focused input field to full screen input field located on top of keyboard. This mode can be activated by VirtualKeyboardSettings.fullScreenMode. [ChangeLog] Added full screen input mode for super wide screens. Change-Id: Ib2650c04767fb0945cc2bedc5b1801d254a15a41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/virtualkeyboard/basic/basic-b2qt.qml14
-rw-r--r--examples/virtualkeyboard/basic/content/TextArea.qml4
2 files changed, 13 insertions, 5 deletions
diff --git a/examples/virtualkeyboard/basic/basic-b2qt.qml b/examples/virtualkeyboard/basic/basic-b2qt.qml
index 8d2727cd..7df2a0f6 100644
--- a/examples/virtualkeyboard/basic/basic-b2qt.qml
+++ b/examples/virtualkeyboard/basic/basic-b2qt.qml
@@ -29,7 +29,8 @@
import QtQuick 2.0
import QtQuick.Window 2.2
-import QtQuick.VirtualKeyboard 2.1
+import QtQuick.VirtualKeyboard 2.2
+import QtQuick.VirtualKeyboard.Settings 2.2
import "content"
Item {
@@ -80,7 +81,7 @@ Item {
double-click changes the availability of the full screen handwriting input.
*/
Item {
- z: 89
+ z: 99
visible: handwritingInputPanel.enabled && Qt.inputMethod.visible
anchors { left: parent.left; top: parent.top; right: parent.right; bottom: inputPanel.top; }
HandwritingModeButton {
@@ -104,7 +105,7 @@ Item {
*/
InputPanel {
id: inputPanel
- z: 99
+ z: 89
y: appContainer.height
anchors.left: parent.left
anchors.right: parent.right
@@ -126,6 +127,7 @@ Item {
from: ""
to: "visible"
reversible: true
+ enabled: !VirtualKeyboardSettings.fullScreenMode
ParallelAnimation {
NumberAnimation {
properties: "y"
@@ -141,5 +143,11 @@ Item {
}
AutoScroller {}
}
+
+ Binding {
+ target: VirtualKeyboardSettings
+ property: "fullScreenMode"
+ value: appContainer.height > 0 && (appContainer.width / appContainer.height) > (16.0 / 9.0)
+ }
}
}
diff --git a/examples/virtualkeyboard/basic/content/TextArea.qml b/examples/virtualkeyboard/basic/content/TextArea.qml
index 1b66a475..b9233710 100644
--- a/examples/virtualkeyboard/basic/content/TextArea.qml
+++ b/examples/virtualkeyboard/basic/content/TextArea.qml
@@ -68,8 +68,8 @@ TextBase {
cursorVisible: activeFocus
height: Math.max(implicitHeight, 60)
font.pixelSize: textArea.fontPixelSize
- selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5)
- selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8)
+ selectionColor: Qt.rgba(0, 0, 0, 0.15)
+ selectedTextColor: color
selectByMouse: true
anchors { left: parent.left; right: parent.right; margins: 12 }
}