From a2e90271618899f8bd82aecb31069b794b2f7874 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 3 Oct 2023 18:56:15 +0200 Subject: [PATCH] qml: don't show "select server automatically" checkbox in network setup wizard --- .../qml/components/controls/ServerConfig.qml | 19 ++++++++++--------- .../qml/components/wizard/WCAutoConnect.qml | 1 + .../qml/components/wizard/WCProxyConfig.qml | 4 ---- .../qml/components/wizard/WCServerConfig.qml | 9 +++------ 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/electrum/gui/qml/components/controls/ServerConfig.qml b/electrum/gui/qml/components/controls/ServerConfig.qml index 6af8c847c557..523da5ef3c5e 100644 --- a/electrum/gui/qml/components/controls/ServerConfig.qml +++ b/electrum/gui/qml/components/controls/ServerConfig.qml @@ -5,9 +5,11 @@ import QtQuick.Controls.Material import org.electrum 1.0 + Item { id: root + property bool showAutoselectServer: true property alias auto_connect: auto_server_cb.checked property alias address: address_tf.text @@ -22,27 +24,26 @@ Item { CheckBox { id: auto_server_cb + visible: showAutoselectServer text: qsTr('Select server automatically') checked: true } - GridLayout { - columns: 2 - Layout.fillWidth: true + Label { + text: qsTr("Server") + enabled: address_tf.enabled + } - Label { - text: qsTr("Server") - enabled: address_tf.enabled - } + TextHighlightPane { + Layout.fillWidth: true TextField { id: address_tf enabled: !auto_server_cb.checked - Layout.fillWidth: true + width: parent.width } } - ColumnLayout { Heading { text: qsTr('Servers') diff --git a/electrum/gui/qml/components/wizard/WCAutoConnect.qml b/electrum/gui/qml/components/wizard/WCAutoConnect.qml index b864eeefe634..c6700da83b71 100644 --- a/electrum/gui/qml/components/wizard/WCAutoConnect.qml +++ b/electrum/gui/qml/components/wizard/WCAutoConnect.qml @@ -1,3 +1,4 @@ +import QtQuick import QtQuick.Layouts import QtQuick.Controls diff --git a/electrum/gui/qml/components/wizard/WCProxyConfig.qml b/electrum/gui/qml/components/wizard/WCProxyConfig.qml index 727a5cdedeb0..b58e29f458a6 100644 --- a/electrum/gui/qml/components/wizard/WCProxyConfig.qml +++ b/electrum/gui/qml/components/wizard/WCProxyConfig.qml @@ -15,10 +15,6 @@ WizardComponent { width: parent.width spacing: constants.paddingLarge - Label { - text: qsTr('Proxy settings') - } - ProxyConfig { id: pc Layout.fillWidth: true diff --git a/electrum/gui/qml/components/wizard/WCServerConfig.qml b/electrum/gui/qml/components/wizard/WCServerConfig.qml index 4a2f16e8b64d..b2829caae909 100644 --- a/electrum/gui/qml/components/wizard/WCServerConfig.qml +++ b/electrum/gui/qml/components/wizard/WCServerConfig.qml @@ -9,7 +9,7 @@ WizardComponent { last: true function apply() { - wizard_data['autoconnect'] = sc.auto_connect + wizard_data['autoconnect'] = false wizard_data['server'] = sc.address } @@ -17,13 +17,10 @@ WizardComponent { anchors.fill: parent spacing: constants.paddingLarge - Label { - text: qsTr('Server settings') - } - ServerConfig { id: sc - width: parent.width + showAutoselectServer: false + Layout.fillWidth: true Layout.fillHeight: true } }