From 895679a6bef4f4ecfcf434036c3309a038ae846a Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 23 Feb 2026 13:16:48 +0100 Subject: [PATCH] qml: styling History, ProxyConfig and NostrConfigDialog --- electrum/gui/qml/components/History.qml | 4 +- .../gui/qml/components/NostrConfigDialog.qml | 20 +++--- .../qml/components/controls/ProxyConfig.qml | 72 +++++++++---------- 3 files changed, 46 insertions(+), 50 deletions(-) diff --git a/electrum/gui/qml/components/History.qml b/electrum/gui/qml/components/History.qml index c99be7599..7b2782bb7 100644 --- a/electrum/gui/qml/components/History.qml +++ b/electrum/gui/qml/components/History.qml @@ -14,8 +14,8 @@ Pane { padding: 0 clip: true - background: Rectangle { - color: constants.darkerBackground + background: PaneInsetBackground { + vertical: false } ElListView { diff --git a/electrum/gui/qml/components/NostrConfigDialog.qml b/electrum/gui/qml/components/NostrConfigDialog.qml index 2a62fc748..0eb6cfd86 100644 --- a/electrum/gui/qml/components/NostrConfigDialog.qml +++ b/electrum/gui/qml/components/NostrConfigDialog.qml @@ -52,16 +52,18 @@ ElDialog { Layout.rightMargin: constants.paddingLarge Layout.bottomMargin: constants.paddingLarge - DialogHighlightPane { + InfoTextArea { Layout.fillWidth: true - Label { - text: qsTr('Enter the list of Nostr relays') + '

' + - qsTr('Nostr relays are used to send and receive submarine swap offers.') + - ' ' + qsTr('For multisig wallets, nostr is also used to relay transactions to your co-signers.') + - ' ' + qsTr('Connections to nostr are only made when required, and ephemerally.') - width: parent.width - wrapMode: Text.Wrap - } + Layout.bottomMargin: constants.paddingLarge + compact: true + text: qsTr('Nostr relays are used to send and receive submarine swap offers.') + + ' ' + qsTr('For multisig wallets, nostr is also used to relay transactions to your co-signers.') + + ' ' + qsTr('Connections to nostr are only made when required, and ephemerally.') + backgroundColor: constants.darkerDialogBackground + } + + Label { + text: qsTr('Enter the list of Nostr relays') } RowLayout { diff --git a/electrum/gui/qml/components/controls/ProxyConfig.qml b/electrum/gui/qml/components/controls/ProxyConfig.qml index 05bc05b2b..e1e665d6e 100644 --- a/electrum/gui/qml/components/controls/ProxyConfig.qml +++ b/electrum/gui/qml/components/controls/ProxyConfig.qml @@ -53,68 +53,62 @@ Item { model: proxy_type_map } - GridLayout { - columns: 2 + ColumnLayout { + // columns: 2 Layout.fillWidth: true + spacing: constants.paddingSmall - Label { - text: qsTr("Address") - enabled: address.enabled - } + RowLayout { + Layout.fillWidth: true + Layout.rightMargin: constants.paddingLarge - TextField { - id: address - enabled: proxy_enabled_cb.checked - inputMethodHints: Qt.ImhNoPredictiveText + TextField { + id: address + Layout.fillWidth: true + enabled: proxy_enabled_cb.checked + inputMethodHints: Qt.ImhNoPredictiveText + placeholderText: qsTr("Address") + } + + TextField { + id: port + Layout.fillWidth: true + enabled: proxy_enabled_cb.checked + inputMethodHints: Qt.ImhDigitsOnly + placeholderText: qsTr("Port") + } } Label { - text: qsTr("Port") - enabled: port.enabled - } - - TextField { - id: port - enabled: proxy_enabled_cb.checked - inputMethodHints: Qt.ImhDigitsOnly - } - - Label { - text: qsTr("Username") + Layout.topMargin: constants.paddingLarge + text: qsTr("Authentication") enabled: username_tf.enabled } TextField { id: username_tf + Layout.fillWidth: true + Layout.rightMargin: constants.paddingLarge enabled: proxy_enabled_cb.checked inputMethodHints: Qt.ImhNoPredictiveText - } - - Label { - text: qsTr("Password") - enabled: password_tf.enabled + placeholderText: qsTr("Username") } PasswordField { id: password_tf enabled: proxy_enabled_cb.checked + placeholderText: qsTr("Password") } } - Pane { + Button { Layout.alignment: Qt.AlignHCenter Layout.topMargin: constants.paddingLarge - padding: 0 - background: Rectangle { - color: constants.darkerDialogBackground - } - FlatButton { - enabled: proxy_enabled_cb.checked && !_probing - text: qsTr('Detect Tor proxy') - onClicked: { - _probing = true - Network.probeTor() - } + enabled: proxy_enabled_cb.checked && !_probing + text: qsTr('Detect Tor proxy') + onClicked: { + _probing = true + Network.probeTor() } }