From 92bff08ba58ef9c30019df494fe3ebbbac552d08 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 29 Dec 2023 16:18:03 +0100 Subject: [PATCH] qml: don't use predictive text for fields where it makes no sense --- electrum/gui/qml/components/Addresses.qml | 4 ++++ electrum/gui/qml/components/SignVerifyMessageDialog.qml | 3 +++ electrum/gui/qml/components/controls/ProxyConfig.qml | 3 +++ electrum/gui/qml/components/controls/ServerConfig.qml | 1 + electrum/gui/qml/components/wizard/WCConfirmSeed.qml | 2 ++ electrum/gui/qml/components/wizard/WCCreateSeed.qml | 1 + electrum/gui/qml/components/wizard/WCHaveSeed.qml | 2 ++ electrum/gui/qml/components/wizard/WCScriptAndDerivation.qml | 2 ++ electrum/gui/qml/components/wizard/WCWalletName.qml | 1 + 9 files changed, 19 insertions(+) diff --git a/electrum/gui/qml/components/Addresses.qml b/electrum/gui/qml/components/Addresses.qml index 04c68de29..aecd75415 100644 --- a/electrum/gui/qml/components/Addresses.qml +++ b/electrum/gui/qml/components/Addresses.qml @@ -85,8 +85,12 @@ Pane { id: searchEdit Layout.fillWidth: true Layout.columnSpan: 3 + placeholderText: qsTr('search') + inputMethodHints: Qt.ImhNoPredictiveText + onTextChanged: listview.filterModel.filterText = text + Image { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter diff --git a/electrum/gui/qml/components/SignVerifyMessageDialog.qml b/electrum/gui/qml/components/SignVerifyMessageDialog.qml index af1581926..0b0fca7bc 100644 --- a/electrum/gui/qml/components/SignVerifyMessageDialog.qml +++ b/electrum/gui/qml/components/SignVerifyMessageDialog.qml @@ -133,6 +133,7 @@ ElDialog { : constants.colorError } } + RowLayout { Layout.fillWidth: true ElTextArea { @@ -142,6 +143,8 @@ ElDialog { Layout.minimumHeight: fontMetrics.lineSpacing * 4 + topPadding + bottomPadding font.family: FixedFont wrapMode: TextInput.Wrap + inputMethodHints: Qt.ImhNoPredictiveText + background: PaneInsetBackground { baseColor: _verified == SignVerifyMessageDialog.Check.Unknown ? constants.darkerDialogBackground diff --git a/electrum/gui/qml/components/controls/ProxyConfig.qml b/electrum/gui/qml/components/controls/ProxyConfig.qml index dea20a9ca..711d759db 100644 --- a/electrum/gui/qml/components/controls/ProxyConfig.qml +++ b/electrum/gui/qml/components/controls/ProxyConfig.qml @@ -74,6 +74,7 @@ Item { TextField { id: address enabled: proxy_enabled_cb.checked + inputMethodHints: Qt.ImhNoPredictiveText } Label { @@ -84,6 +85,7 @@ Item { TextField { id: port enabled: proxy_enabled_cb.checked + inputMethodHints: Qt.ImhDigitsOnly } Label { @@ -94,6 +96,7 @@ Item { TextField { id: username_tf enabled: proxy_enabled_cb.checked + inputMethodHints: Qt.ImhNoPredictiveText } Label { diff --git a/electrum/gui/qml/components/controls/ServerConfig.qml b/electrum/gui/qml/components/controls/ServerConfig.qml index 523da5ef3..9c7160489 100644 --- a/electrum/gui/qml/components/controls/ServerConfig.qml +++ b/electrum/gui/qml/components/controls/ServerConfig.qml @@ -41,6 +41,7 @@ Item { id: address_tf enabled: !auto_server_cb.checked width: parent.width + inputMethodHints: Qt.ImhNoPredictiveText } } diff --git a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml index 514f60fad..a5f27d8e0 100644 --- a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml +++ b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml @@ -51,6 +51,8 @@ WizardComponent { id: customwordstext Layout.fillWidth: true placeholderText: qsTr('Enter your custom word(s)') + inputMethodHints: Qt.ImhNoPredictiveText + onTextChanged: checkValid() } } diff --git a/electrum/gui/qml/components/wizard/WCCreateSeed.qml b/electrum/gui/qml/components/wizard/WCCreateSeed.qml index 8ca1679e6..da087706a 100644 --- a/electrum/gui/qml/components/wizard/WCCreateSeed.qml +++ b/electrum/gui/qml/components/wizard/WCCreateSeed.qml @@ -81,6 +81,7 @@ WizardComponent { visible: extendcb.checked Layout.fillWidth: true placeholderText: qsTr('Enter your custom word(s)') + inputMethodHints: Qt.ImhNoPredictiveText } Component.onCompleted : { diff --git a/electrum/gui/qml/components/wizard/WCHaveSeed.qml b/electrum/gui/qml/components/wizard/WCHaveSeed.qml index 6da2e154f..9f1b322e3 100644 --- a/electrum/gui/qml/components/wizard/WCHaveSeed.qml +++ b/electrum/gui/qml/components/wizard/WCHaveSeed.qml @@ -231,6 +231,8 @@ WizardComponent { Layout.fillWidth: true Layout.columnSpan: 2 placeholderText: qsTr('Enter your custom word(s)') + inputMethodHints: Qt.ImhNoPredictiveText + onTextChanged: startValidationTimer() } } diff --git a/electrum/gui/qml/components/wizard/WCScriptAndDerivation.qml b/electrum/gui/qml/components/wizard/WCScriptAndDerivation.qml index c3a30fbd1..3a0ae5923 100644 --- a/electrum/gui/qml/components/wizard/WCScriptAndDerivation.qml +++ b/electrum/gui/qml/components/wizard/WCScriptAndDerivation.qml @@ -171,6 +171,8 @@ WizardComponent { id: derivationpathtext Layout.fillWidth: true Layout.leftMargin: constants.paddingMedium + inputMethodHints: Qt.ImhNoPredictiveText + onTextChanged: validate() } diff --git a/electrum/gui/qml/components/wizard/WCWalletName.qml b/electrum/gui/qml/components/wizard/WCWalletName.qml index c4da33c81..581547c18 100644 --- a/electrum/gui/qml/components/wizard/WCWalletName.qml +++ b/electrum/gui/qml/components/wizard/WCWalletName.qml @@ -18,6 +18,7 @@ WizardComponent { id: wallet_name focus: true text: Daemon.suggestWalletName() + inputMethodHints: Qt.ImhNoPredictiveText } }