From 84aaf671eeeaf18919fc4e991952f9491399fab4 Mon Sep 17 00:00:00 2001 From: Mike Trahearn Date: Wed, 11 Dec 2024 17:12:50 +1000 Subject: [PATCH] Reverting temporary changes forcing VKB enablement on desktop. --- ApplicationContent.qml | 19 +++++++++---------- src/main.cpp | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ApplicationContent.qml b/ApplicationContent.qml index 41d44b9b8..dba05ebc0 100644 --- a/ApplicationContent.qml +++ b/ApplicationContent.qml @@ -68,10 +68,10 @@ Item { if (_initialized) { // Only show the notification when the value changes, not when the application is loaded Global.showToastNotification(VenusOS.Notification_Info, (value ? - //% "Touch input on" - qsTrId("application_content_touch_input_on") : - //% "Touch input off" - qsTrId("application_content_touch_input_off")), + //% "Touch input on" + qsTrId("application_content_touch_input_on") : + //% "Touch input off" + qsTrId("application_content_touch_input_off")), 3000) } _initialized = true @@ -151,12 +151,11 @@ Item { id: keyboardHandlerLoader asynchronous: true - source: "qrc:/qt/qml/Victron/VenusOS/components/InputPanel.qml" - // active: Global.isGxDevice - // || (BackendConnection.needsWasmKeyboardHandler && Global.main.width > Global.main.height) - // source: Global.isGxDevice - // ? "qrc:/qt/qml/Victron/VenusOS/components/InputPanel.qml" - // : "qrc:/qt/qml/Victron/VenusOS/components/WasmVirtualKeyboardHandler.qml" + active: Global.isGxDevice + || (BackendConnection.needsWasmKeyboardHandler && Global.main.width > Global.main.height) + source: Global.isGxDevice + ? "qrc:/qt/qml/Victron/VenusOS/components/InputPanel.qml" + : "qrc:/qt/qml/Victron/VenusOS/components/WasmVirtualKeyboardHandler.qml" parent: QtQuickControls.Overlay.overlay z: 1 } diff --git a/src/main.cpp b/src/main.cpp index b05a3c4cd..78088db05 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -271,12 +271,12 @@ int main(int argc, char *argv[]) { qInfo().nospace() << "Victron gui version: v" << PROJECT_VERSION_MAJOR << "." << PROJECT_VERSION_MINOR << "." << PROJECT_VERSION_PATCH; -//#if !defined(VENUS_WEBASSEMBLY_BUILD) && !defined(VENUS_DESKTOP_BUILD) +#if !defined(VENUS_WEBASSEMBLY_BUILD) && !defined(VENUS_DESKTOP_BUILD) // The qt vkb behaves in an annoying manner in qt6.5.2 wasm builds (but not other versions). // It pops up every time you tap the screen, making landscape mode unusable. // The native vkb gets used instead, so a keyboard is still available when required. qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); -//#endif +#endif qreal scaleFactor = 1.0;