Browse Source

qml: styling server/proxy config

master
Sander van Grieken 3 years ago
parent
commit
f13b43d546
  1. 18
      electrum/gui/qml/components/ProxyConfigDialog.qml
  2. 17
      electrum/gui/qml/components/ServerConfigDialog.qml

18
electrum/gui/qml/components/ProxyConfigDialog.qml

@ -23,18 +23,26 @@ ElDialog {
color: "#aa000000"
}
padding: 0
ColumnLayout {
id: layout
width: parent.width
height: parent.height
spacing: 0
ProxyConfig {
Layout.fillWidth: true
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
id: proxyconfig
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
Button {
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
FlatButton {
Layout.fillWidth: true
text: qsTr('Ok')
icon.source: '../../icons/confirmed.png'
onClicked: {
var proxy = proxyconfig.toProxyDict()
if (proxy && proxy['enabled'] == true) {
@ -46,7 +54,7 @@ ElDialog {
}
}
}
}
Component.onCompleted: {
var p = Network.proxy

17
electrum/gui/qml/components/ServerConfigDialog.qml

@ -23,18 +23,26 @@ ElDialog {
color: "#aa000000"
}
padding: 0
ColumnLayout {
id: layout
width: parent.width
height: parent.height
spacing: 0
ServerConfig {
id: serverconfig
Layout.fillWidth: true
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
Button {
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
FlatButton {
Layout.fillWidth: true
text: qsTr('Ok')
icon.source: '../../icons/confirmed.png'
onClicked: {
Config.autoConnect = serverconfig.auto_server
if (!serverconfig.auto_server) {
@ -44,7 +52,6 @@ ElDialog {
}
}
}
}
Component.onCompleted: {
serverconfig.auto_server = Config.autoConnect

Loading…
Cancel
Save