Browse Source

qml: move fee bump button below fee amount

master
Sander van Grieken 3 years ago
parent
commit
049a59f57a
  1. 23
      electrum/gui/qml/components/TxDetails.qml

23
electrum/gui/qml/components/TxDetails.qml

@ -105,15 +105,20 @@ Pane {
FormattedAmount { FormattedAmount {
Layout.fillWidth: true Layout.fillWidth: true
amount: txdetails.fee amount: txdetails.fee
singleLine: !(txdetails.canBump || txdetails.canCpfp) }
}
Item {
visible: feebumpButton.visible
Layout.preferredWidth: 1 ; Layout.preferredHeight: 1
} }
FlatButton { FlatButton {
Layout.fillWidth: true id: feebumpButton
Layout.minimumWidth: implicitWidth visible: txdetails.canBump || txdetails.canCpfp
textUnderIcon: false
icon.source: '../../icons/warning.png' icon.source: '../../icons/warning.png'
icon.color: 'transparent' icon.color: 'transparent'
text: qsTr('Bump fee') text: qsTr('Bump fee')
visible: txdetails.canBump || txdetails.canCpfp
onClicked: { onClicked: {
if (txdetails.canBump) { if (txdetails.canBump) {
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid }) var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
@ -123,7 +128,6 @@ Pane {
dialog.open() dialog.open()
} }
} }
}
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
@ -385,27 +389,24 @@ Pane {
rawtx: root.rawtx rawtx: root.rawtx
onLabelChanged: root.detailsChanged() onLabelChanged: root.detailsChanged()
onConfirmRemoveLocalTx: { onConfirmRemoveLocalTx: {
var dialog = app.messageDialog.createObject(app, {'text': message, 'yesno': true}) var dialog = app.messageDialog.createObject(app, { text: message, yesno: true })
dialog.yesClicked.connect(function() { dialog.yesClicked.connect(function() {
dialog.close() dialog.close()
txdetails.removeLocalTx(true) txdetails.removeLocalTx(true)
txdetails.wallet.historyModel.init_model(true)
root.close() root.close()
}) })
dialog.open() dialog.open()
} }
onSaveTxSuccess: { onSaveTxSuccess: {
var dialog = app.messageDialog.createObject(app, { var dialog = app.messageDialog.createObject(app, {
'text': qsTr('Transaction added to wallet history.') + '\n\n' + text: qsTr('Transaction added to wallet history.') + '\n\n' +
qsTr('Note: this is an offline transaction, if you want the network to see it, you need to broadcast it.') qsTr('Note: this is an offline transaction, if you want the network to see it, you need to broadcast it.')
}) })
dialog.open() dialog.open()
root.close() root.close()
} }
onSaveTxError: { onSaveTxError: {
var dialog = app.messageDialog.createObject(app, { var dialog = app.messageDialog.createObject(app, { text: message })
'text': message
})
dialog.open() dialog.open()
} }
} }

Loading…
Cancel
Save