qml: bind invoice.amount to internal property. fixes #8262
This commit is contained in:
@@ -23,6 +23,8 @@ ElDialog {
|
|||||||
|
|
||||||
property bool _canMax: invoice.invoiceType == Invoice.OnchainInvoice
|
property bool _canMax: invoice.invoiceType == Invoice.OnchainInvoice
|
||||||
|
|
||||||
|
property Amount _invoice_amount: invoice.amount
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -184,7 +186,7 @@ ElDialog {
|
|||||||
Label {
|
Label {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: invoice.amount.isMax
|
visible: _invoice_amount.isMax
|
||||||
font.pixelSize: constants.fontSizeXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: qsTr('All on-chain funds')
|
text: qsTr('All on-chain funds')
|
||||||
@@ -193,7 +195,7 @@ ElDialog {
|
|||||||
Label {
|
Label {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: invoice.amount.isEmpty
|
visible: _invoice_amount.isEmpty
|
||||||
font.pixelSize: constants.fontSizeXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
color: constants.mutedForeground
|
color: constants.mutedForeground
|
||||||
text: qsTr('not specified')
|
text: qsTr('not specified')
|
||||||
@@ -201,7 +203,7 @@ ElDialog {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
visible: !invoice.amount.isMax && !invoice.amount.isEmpty
|
visible: !_invoice_amount.isMax && !_invoice_amount.isEmpty
|
||||||
font.pixelSize: constants.fontSizeXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
font.family: FixedFont
|
font.family: FixedFont
|
||||||
font.bold: true
|
font.bold: true
|
||||||
@@ -210,7 +212,7 @@ ElDialog {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: !invoice.amount.isMax && !invoice.amount.isEmpty
|
visible: !_invoice_amount.isMax && !_invoice_amount.isEmpty
|
||||||
text: Config.baseUnit
|
text: Config.baseUnit
|
||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
font.pixelSize: constants.fontSizeXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
@@ -219,7 +221,7 @@ ElDialog {
|
|||||||
Label {
|
Label {
|
||||||
id: fiatValue
|
id: fiatValue
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
visible: Daemon.fx.enabled && !invoice.amount.isMax && !invoice.amount.isEmpty
|
visible: Daemon.fx.enabled && !_invoice_amount.isMax && !_invoice_amount.isEmpty
|
||||||
text: Daemon.fx.fiatValue(invoice.amount, false)
|
text: Daemon.fx.fiatValue(invoice.amount, false)
|
||||||
font.pixelSize: constants.fontSizeMedium
|
font.pixelSize: constants.fontSizeMedium
|
||||||
color: constants.mutedForeground
|
color: constants.mutedForeground
|
||||||
@@ -227,7 +229,7 @@ ElDialog {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: Daemon.fx.enabled && !invoice.amount.isMax && !invoice.amount.isEmpty
|
visible: Daemon.fx.enabled && !_invoice_amount.isMax && !_invoice_amount.isEmpty
|
||||||
text: Daemon.fx.fiatCurrency
|
text: Daemon.fx.fiatCurrency
|
||||||
font.pixelSize: constants.fontSizeMedium
|
font.pixelSize: constants.fontSizeMedium
|
||||||
color: constants.mutedForeground
|
color: constants.mutedForeground
|
||||||
|
|||||||
Reference in New Issue
Block a user