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

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

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

Loading…
Cancel
Save