1
0

qml: FeePicker parameterize enable display of tx info and picker, use this for CPFP

to put picker in Total section
This commit is contained in:
Sander van Grieken
2024-02-16 12:56:18 +01:00
parent c0b892720e
commit 016e500993
2 changed files with 26 additions and 6 deletions

View File

@@ -65,15 +65,16 @@ ElDialog {
TextHighlightPane {
Layout.columnSpan: 2
Layout.fillWidth: true
height: feepicker.height
height: feepicker_childinfo.height
FeePicker {
id: feepicker
id: feepicker_childinfo
width: parent.width
finalizer: dialog.cpfpfeebumper
targetLabel: qsTr('Target total')
feeLabel: qsTr('Fee for child')
feeRateLabel: qsTr('Fee rate for child')
showPicker: false
}
}
@@ -82,13 +83,11 @@ ElDialog {
Layout.topMargin: constants.paddingSmall
text: qsTr('Total')
color: Material.accentColor
visible: cpfpfeebumper.valid
}
TextHighlightPane {
Layout.columnSpan: 2
Layout.fillWidth: true
visible: cpfpfeebumper.valid
GridLayout {
width: parent.width
@@ -104,7 +103,9 @@ ElDialog {
Label {
Layout.preferredWidth: 2
Layout.fillWidth: true
text: cpfpfeebumper.totalSize + ' ' + UI_UNIT_NAME.TXSIZE_VBYTES
text: cpfpfeebumper.valid
? cpfpfeebumper.totalSize + ' ' + UI_UNIT_NAME.TXSIZE_VBYTES
: ''
}
Label {
@@ -118,6 +119,7 @@ ElDialog {
Layout.preferredWidth: 2
Layout.fillWidth: true
amount: cpfpfeebumper.totalFee
valid: cpfpfeebumper.valid
}
Label {
@@ -141,6 +143,14 @@ ElDialog {
color: Material.accentColor
}
}
FeePicker {
id: feepicker
Layout.columnSpan: 2
Layout.fillWidth: true
finalizer: dialog.cpfpfeebumper
showTxInfo: false
}
}
}

View File

@@ -16,6 +16,9 @@ Item {
property string feeLabel: qsTr('Mining fee')
property string feeRateLabel: qsTr('Fee rate')
property bool showTxInfo: true
property bool showPicker: true
implicitHeight: rootLayout.height
GridLayout {
@@ -28,6 +31,7 @@ Item {
Layout.preferredWidth: 1
text: feeLabel
color: Material.accentColor
visible: showTxInfo
}
FormattedAmount {
@@ -35,6 +39,7 @@ Item {
Layout.preferredWidth: 2
amount: finalizer.fee
valid: finalizer.valid
visible: showTxInfo
}
Label {
@@ -42,11 +47,13 @@ Item {
Layout.preferredWidth: 1
text: feeRateLabel
color: Material.accentColor
visible: showTxInfo
}
RowLayout {
Layout.fillWidth: true
Layout.preferredWidth: 2
visible: showTxInfo
Label {
id: feeRate
text: finalizer.valid ? finalizer.feeRate : ''
@@ -54,6 +61,7 @@ Item {
}
Label {
Layout.fillWidth: true
text: finalizer.valid ? UI_UNIT_NAME.FEERATE_SAT_PER_VBYTE : ''
color: Material.accentColor
}
@@ -64,18 +72,20 @@ Item {
Layout.preferredWidth: 1
text: targetLabel
color: Material.accentColor
visible: showPicker
}
Label {
Layout.fillWidth: true
Layout.preferredWidth: 2
id: targetdesc
text: finalizer.target
visible: showPicker
}
RowLayout {
Layout.columnSpan: 2
Layout.fillWidth: true
visible: showPicker
Slider {
id: feeslider