diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index 8aab784c9..bd097f69c 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -44,24 +44,25 @@ Dialog { text: qsTr('Type') } - Label { - text: invoice.invoiceType == Invoice.OnchainInvoice - ? qsTr('On-chain invoice') - : invoice.invoiceType == Invoice.LightningInvoice - ? qsTr('Lightning invoice') - : '' + RowLayout { Layout.fillWidth: true - } - - Label { - text: qsTr('Description') - } + Image { + //Layout.rowSpan: 2 + Layout.preferredWidth: constants.iconSizeSmall + Layout.preferredHeight: constants.iconSizeSmall + source: invoice.invoiceType == Invoice.LightningInvoice + ? "../../icons/lightning.png" + : "../../icons/bitcoin.png" + } - Label { - text: invoice.message - Layout.fillWidth: true - wrapMode: Text.Wrap - elide: Text.ElideRight + Label { + text: invoice.invoiceType == Invoice.OnchainInvoice + ? qsTr('On chain') + : invoice.invoiceType == Invoice.LightningInvoice + ? qsTr('Lightning') + : '' + Layout.fillWidth: true + } } Label { @@ -71,6 +72,8 @@ Dialog { RowLayout { Layout.fillWidth: true Label { + font.pixelSize: constants.fontSizeLarge + font.family: FixedFont font.bold: true text: Config.formatSats(invoice.amount, false) } @@ -90,6 +93,17 @@ Dialog { } } + Label { + text: qsTr('Description') + } + + Label { + text: invoice.message + Layout.fillWidth: true + wrapMode: Text.Wrap + elide: Text.ElideRight + } + Label { visible: invoice.invoiceType == Invoice.OnchainInvoice text: qsTr('Address') diff --git a/electrum/gui/qml/components/RequestDialog.qml b/electrum/gui/qml/components/RequestDialog.qml index caebe04a9..6a4b79e7f 100644 --- a/electrum/gui/qml/components/RequestDialog.qml +++ b/electrum/gui/qml/components/RequestDialog.qml @@ -142,6 +142,7 @@ Dialog { text: Config.formatSats(modelItem.amount) font.family: FixedFont font.pixelSize: constants.fontSizeLarge + font.bold: true } Label { visible: modelItem.amount.satsInt != 0 diff --git a/electrum/gui/qml/components/TxDetails.qml b/electrum/gui/qml/components/TxDetails.qml index b0e8f8cab..d9788a7ec 100644 --- a/electrum/gui/qml/components/TxDetails.qml +++ b/electrum/gui/qml/components/TxDetails.qml @@ -89,6 +89,7 @@ Pane { RowLayout { Label { text: Config.formatSats(txdetails.amount) + font.family: FixedFont } Label { text: Config.baseUnit @@ -106,6 +107,7 @@ Pane { visible: txdetails.amount.satsInt < 0 Label { text: Config.formatSats(txdetails.fee) + font.family: FixedFont } Label { text: Config.baseUnit @@ -230,7 +232,8 @@ Pane { } Label { text: Config.formatSats(modelData.value) - font.pixelSize: constants.fontSizeLarge + font.pixelSize: constants.fontSizeMedium + font.family: FixedFont } Label { text: Config.baseUnit diff --git a/electrum/gui/qml/components/controls/GenericShareDialog.qml b/electrum/gui/qml/components/controls/GenericShareDialog.qml index 392ebfcd6..1e008b7c6 100644 --- a/electrum/gui/qml/components/controls/GenericShareDialog.qml +++ b/electrum/gui/qml/components/controls/GenericShareDialog.qml @@ -34,73 +34,80 @@ Dialog { } } - ColumnLayout { - id: rootLayout - width: parent.width - spacing: constants.paddingMedium + Flickable { + anchors.fill: parent + contentHeight: rootLayout.height + clip:true + interactive: height < contentHeight - Rectangle { - height: 1 - Layout.fillWidth: true - color: Material.accentColor - } - - Image { - id: qr - Layout.alignment: Qt.AlignHCenter - Layout.topMargin: constants.paddingSmall - Layout.bottomMargin: constants.paddingSmall + ColumnLayout { + id: rootLayout + width: parent.width + spacing: constants.paddingMedium Rectangle { - property int size: 57 // should be qr pixel multiple - color: 'white' - x: (parent.width - size) / 2 - y: (parent.height - size) / 2 - width: size - height: size - - Image { - source: '../../../icons/electrum.png' - x: 1 - y: 1 - width: parent.width - 2 - height: parent.height - 2 - scale: 0.9 - } + height: 1 + Layout.fillWidth: true + color: Material.accentColor } - } - Rectangle { - height: 1 - Layout.fillWidth: true - color: Material.accentColor - } + Image { + id: qr + Layout.alignment: Qt.AlignHCenter + Layout.topMargin: constants.paddingSmall + Layout.bottomMargin: constants.paddingSmall - TextHighlightPane { - Layout.fillWidth: true - Label { - width: parent.width - text: dialog.text - wrapMode: Text.Wrap - font.pixelSize: constants.fontSizeLarge - font.family: FixedFont + Rectangle { + property int size: 57 // should be qr pixel multiple + color: 'white' + x: (parent.width - size) / 2 + y: (parent.height - size) / 2 + width: size + height: size + + Image { + source: '../../../icons/electrum.png' + x: 1 + y: 1 + width: parent.width - 2 + height: parent.height - 2 + scale: 0.9 + } + } } - } - RowLayout { - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - Button { - text: qsTr('Copy') - icon.source: '../../../icons/copy_bw.png' - onClicked: AppController.textToClipboard(dialog.text) + Rectangle { + height: 1 + Layout.fillWidth: true + color: Material.accentColor } - Button { - //enabled: false - text: qsTr('Share') - icon.source: '../../../icons/share.png' - onClicked: { - AppController.doShare(dialog.text, dialog.title) + + TextHighlightPane { + Layout.fillWidth: true + Label { + width: parent.width + text: dialog.text + wrapMode: Text.Wrap + font.pixelSize: constants.fontSizeLarge + font.family: FixedFont + } + } + + RowLayout { + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + Button { + text: qsTr('Copy') + icon.source: '../../../icons/copy_bw.png' + onClicked: AppController.textToClipboard(dialog.text) + } + Button { + //enabled: false + text: qsTr('Share') + icon.source: '../../../icons/share.png' + onClicked: { + AppController.doShare(dialog.text, dialog.title) + } } } } diff --git a/electrum/gui/qml/components/controls/TextHighlightPane.qml b/electrum/gui/qml/components/controls/TextHighlightPane.qml index 5ac2e5331..7e38b327f 100644 --- a/electrum/gui/qml/components/controls/TextHighlightPane.qml +++ b/electrum/gui/qml/components/controls/TextHighlightPane.qml @@ -4,6 +4,8 @@ import QtQuick.Controls 2.0 import QtQuick.Controls.Material 2.0 Pane { + topPadding: constants.paddingSmall + bottomPadding: constants.paddingSmall background: Rectangle { color: Qt.lighter(Material.background, 1.15) radius: constants.paddingSmall