Skip to content

Commit

Permalink
qml: don't show "select server automatically" checkbox in network set…
Browse files Browse the repository at this point in the history
…up wizard
  • Loading branch information
accumulator committed Oct 3, 2023
1 parent dd41225 commit a2e9027
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
19 changes: 10 additions & 9 deletions electrum/gui/qml/components/controls/ServerConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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')
Expand Down
1 change: 1 addition & 0 deletions electrum/gui/qml/components/wizard/WCAutoConnect.qml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls

Expand Down
4 changes: 0 additions & 4 deletions electrum/gui/qml/components/wizard/WCProxyConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ WizardComponent {
width: parent.width
spacing: constants.paddingLarge

Label {
text: qsTr('Proxy settings')
}

ProxyConfig {
id: pc
Layout.fillWidth: true
Expand Down
9 changes: 3 additions & 6 deletions electrum/gui/qml/components/wizard/WCServerConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ WizardComponent {
last: true

function apply() {
wizard_data['autoconnect'] = sc.auto_connect
wizard_data['autoconnect'] = false
wizard_data['server'] = sc.address
}

ColumnLayout {
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
}
}
Expand Down

0 comments on commit a2e9027

Please sign in to comment.