From fbc5be54a9a95ea3a27c48763d4a473e321b6398 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 21 Nov 2022 23:05:46 +0100 Subject: [PATCH] qml: fix create/confirm seed_variant parameter, styling receivedetailsdialog --- .../qml/components/ReceiveDetailsDialog.qml | 133 +++++++++--------- .../qml/components/wizard/WCCreateSeed.qml | 1 + 2 files changed, 70 insertions(+), 64 deletions(-) diff --git a/electrum/gui/qml/components/ReceiveDetailsDialog.qml b/electrum/gui/qml/components/ReceiveDetailsDialog.qml index 0c6c50f32..d59db8435 100644 --- a/electrum/gui/qml/components/ReceiveDetailsDialog.qml +++ b/electrum/gui/qml/components/ReceiveDetailsDialog.qml @@ -19,83 +19,88 @@ ElDialog { parent: Overlay.overlay modal: true - standardButtons: Dialog.Close + standardButtons: Dialog.Cancel iconSource: Qt.resolvedUrl('../../icons/pen.png') Overlay.modal: Rectangle { color: "#aa000000" } - implicitWidth: parent.width + padding: 0 - GridLayout { - id: form + ColumnLayout { width: parent.width - rowSpacing: constants.paddingSmall - columnSpacing: constants.paddingSmall - columns: 4 - Label { - text: qsTr('Message') - } - - TextField { - id: message - placeholderText: qsTr('Description of payment request') - Layout.columnSpan: 3 + GridLayout { + id: form Layout.fillWidth: true + Layout.leftMargin: constants.paddingLarge + Layout.rightMargin: constants.paddingLarge + Layout.bottomMargin: constants.paddingLarge + + rowSpacing: constants.paddingSmall + columnSpacing: constants.paddingSmall + columns: 4 + + Label { + text: qsTr('Message') + } + + TextField { + id: message + placeholderText: qsTr('Description of payment request') + Layout.columnSpan: 3 + Layout.fillWidth: true + } + + Label { + text: qsTr('Request') + wrapMode: Text.WordWrap + Layout.rightMargin: constants.paddingXLarge + } + + BtcField { + id: amountBtc + fiatfield: amountFiat + Layout.preferredWidth: parent.width /3 + } + + Label { + text: Config.baseUnit + color: Material.accentColor + } + + Item { width: 1; height: 1; Layout.fillWidth: true } + + Item { visible: Daemon.fx.enabled; width: 1; height: 1 } + + FiatField { + id: amountFiat + btcfield: amountBtc + visible: Daemon.fx.enabled + Layout.preferredWidth: parent.width /3 + } + + Label { + visible: Daemon.fx.enabled + text: Daemon.fx.fiatCurrency + color: Material.accentColor + } + + Item { visible: Daemon.fx.enabled; width: 1; height: 1; Layout.fillWidth: true } + + Label { + text: qsTr('Expires after') + Layout.fillWidth: false + } + + RequestExpiryComboBox { + id: expires + Layout.columnSpan: 2 + } } - Label { - text: qsTr('Request') - wrapMode: Text.WordWrap - Layout.rightMargin: constants.paddingXLarge - } - - BtcField { - id: amountBtc - fiatfield: amountFiat - Layout.preferredWidth: parent.width /3 - } - - Label { - text: Config.baseUnit - color: Material.accentColor - } - - Item { width: 1; height: 1; Layout.fillWidth: true } - - Item { visible: Daemon.fx.enabled; width: 1; height: 1 } - - FiatField { - id: amountFiat - btcfield: amountBtc - visible: Daemon.fx.enabled - Layout.preferredWidth: parent.width /3 - } - - Label { - visible: Daemon.fx.enabled - text: Daemon.fx.fiatCurrency - color: Material.accentColor - } - - Item { visible: Daemon.fx.enabled; width: 1; height: 1; Layout.fillWidth: true } - - Label { - text: qsTr('Expires after') - Layout.fillWidth: false - } - - RequestExpiryComboBox { - id: expires - Layout.columnSpan: 2 - } - - Item { width: 1; height: 1; Layout.fillWidth: true } - FlatButton { - Layout.columnSpan: 4 Layout.fillWidth: true text: qsTr('Apply') icon.source: '../../icons/confirmed.png' diff --git a/electrum/gui/qml/components/wizard/WCCreateSeed.qml b/electrum/gui/qml/components/wizard/WCCreateSeed.qml index e42c613e1..202209b04 100644 --- a/electrum/gui/qml/components/wizard/WCCreateSeed.qml +++ b/electrum/gui/qml/components/wizard/WCCreateSeed.qml @@ -11,6 +11,7 @@ WizardComponent { function apply() { wizard_data['seed'] = seedtext.text + wizard_data['seed_variant'] = 'electrum' // generated seed always electrum variant wizard_data['seed_extend'] = extendcb.checked wizard_data['seed_extra_words'] = extendcb.checked ? customwordstext.text : '' }