summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-12-12 23:02:37 -0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-12-14 00:23:10 +0000
commitb734304cbff43b01b18315d0b8c5d6102a845682 (patch)
treeb513d1a3099012e84ad9306cb727eb1efe820750
parent7a7a253bd077e08a28490acff8b0110a7be93b16 (diff)
settings: switch keyboard to qtvirtualkeyboardplugin
Use qtvirtualkeyboardplugin for keyboard input since it supports internationalization and uses vector graphics which allows screen scaling. Bug-AGL: SPEC-1185 Change-Id: Ifddefe9b9884d1087683befc011b7172f5c2305f Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--app/Settings.qml10
-rw-r--r--app/app.pro5
-rw-r--r--app/main.cpp1
-rw-r--r--app/wifi/Wifi.qml8
4 files changed, 16 insertions, 8 deletions
diff --git a/app/Settings.qml b/app/Settings.qml
index 56767f3..5862bd8 100644
--- a/app/Settings.qml
+++ b/app/Settings.qml
@@ -17,6 +17,7 @@
import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
+import QtQuick.VirtualKeyboard 2.1
import 'datetime'
import 'bluetooth'
@@ -32,6 +33,15 @@ ApplicationWindow {
stack.pop(settings)
}
+ InputPanel {
+ id: inputPanel
+ z: 1
+ visible: Qt.inputMethod.visible
+ y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+
StackView {
id: stack
anchors.fill: parent
diff --git a/app/app.pro b/app/app.pro
index 36a71f0..ee88c13 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -6,6 +6,11 @@ SOURCES = main.cpp
CONFIG += link_pkgconfig
PKGCONFIG += libhomescreen qlibwindowmanager
+static {
+ QTPLUGIN += qtvirtualkeyboardplugin
+ QT += svg
+}
+
RESOURCES += \
settings.qrc \
images/images.qrc \
diff --git a/app/main.cpp b/app/main.cpp
index d496ef6..3a71fb0 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -50,6 +50,7 @@ int main(int argc, char *argv[])
{
QString myname = QString("Settings");
+ qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
QGuiApplication app(argc, argv);
app.setApplicationName(myname);
app.setApplicationVersion(QStringLiteral("0.1.0"));
diff --git a/app/wifi/Wifi.qml b/app/wifi/Wifi.qml
index 77e0759..d6b76c9 100644
--- a/app/wifi/Wifi.qml
+++ b/app/wifi/Wifi.qml
@@ -399,14 +399,6 @@ SettingPage {
}
}
}
-
- Keyboard {
- id: keyboard
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.preferredHeight: 1
- target: activeFocusControl
- }
}
}