From f13b43d546e48d672a1ecf87263f50723632c9da Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 30 Dec 2022 22:40:29 +0100 Subject: [PATCH] qml: styling server/proxy config --- .../gui/qml/components/ProxyConfigDialog.qml | 34 ++++++++++++------- .../gui/qml/components/ServerConfigDialog.qml | 29 ++++++++++------ 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/electrum/gui/qml/components/ProxyConfigDialog.qml b/electrum/gui/qml/components/ProxyConfigDialog.qml index b4689034d..a0a5e9001 100644 --- a/electrum/gui/qml/components/ProxyConfigDialog.qml +++ b/electrum/gui/qml/components/ProxyConfigDialog.qml @@ -23,31 +23,39 @@ 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 { - text: qsTr('Ok') - onClicked: { - var proxy = proxyconfig.toProxyDict() - if (proxy && proxy['enabled'] == true) { - Network.proxy = proxy - } else { - Network.proxy = {'enabled': false} - } - rootItem.close() + 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) { + Network.proxy = proxy + } else { + Network.proxy = {'enabled': false} } + rootItem.close() } } } + Component.onCompleted: { var p = Network.proxy console.log(JSON.stringify(p)) diff --git a/electrum/gui/qml/components/ServerConfigDialog.qml b/electrum/gui/qml/components/ServerConfigDialog.qml index 02749085f..ef55175ac 100644 --- a/electrum/gui/qml/components/ServerConfigDialog.qml +++ b/electrum/gui/qml/components/ServerConfigDialog.qml @@ -23,25 +23,32 @@ 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 { - text: qsTr('Ok') - onClicked: { - Config.autoConnect = serverconfig.auto_server - if (!serverconfig.auto_server) { - Network.server = serverconfig.address - } - rootItem.close() + 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) { + Network.server = serverconfig.address } + rootItem.close() } } }