qml: layout fixes for small form-factor devices
This commit is contained in:
@@ -26,185 +26,198 @@ ElDialog {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
GridLayout {
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.leftMargin: constants.paddingLarge
|
||||
Layout.rightMargin: constants.paddingLarge
|
||||
columns: 2
|
||||
Flickable {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('A CPFP is a transaction that sends an unconfirmed output back to yourself, with a high fee. The goal is to have miners confirm the parent transaction in order to get the fee attached to the child transaction.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
leftMargin: constants.paddingLarge
|
||||
rightMargin: constants.paddingLarge
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
text: qsTr('The proposed fee is computed using your fee/kB settings, applied to the total size of both child and parent transactions. After you broadcast a CPFP transaction, it is normal to see a new unconfirmed transaction in your history.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
contentHeight: rootLayout.height
|
||||
clip: true
|
||||
interactive: height < contentHeight
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Total size')
|
||||
color: Material.accentColor
|
||||
}
|
||||
GridLayout {
|
||||
id: rootLayout
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('%1 bytes').arg(cpfpfeebumper.totalSize)
|
||||
}
|
||||
columns: 2
|
||||
|
||||
Label {
|
||||
text: qsTr('Input amount')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.inputAmount
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Output amount')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.outputAmount
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: feeslider
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: cpfpfeebumper.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
cpfpfeebumper.sliderPos = value
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('A CPFP is a transaction that sends an unconfirmed output back to yourself, with a high fee. The goal is to have miners confirm the parent transaction in order to get the fee attached to the child transaction.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = cpfpfeebumper.sliderPos
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
text: qsTr('The proposed fee is computed using your fee/kB settings, applied to the total size of both child and parent transactions. After you broadcast a CPFP transaction, it is normal to see a new unconfirmed transaction in your history.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
Connections {
|
||||
target: cpfpfeebumper
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = cpfpfeebumper.sliderPos
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Total size')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('%1 bytes').arg(cpfpfeebumper.totalSize)
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Input amount')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.inputAmount
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Output amount')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.outputAmount
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.columnSpan: 2
|
||||
Slider {
|
||||
id: feeslider
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: cpfpfeebumper.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
cpfpfeebumper.sliderPos = value
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = cpfpfeebumper.sliderPos
|
||||
}
|
||||
Connections {
|
||||
target: cpfpfeebumper
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = cpfpfeebumper.sliderPos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: feemethod
|
||||
feeslider: cpfpfeebumper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: feemethod
|
||||
feeslider: cpfpfeebumper
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: feemethod.currentValue
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: feemethod.currentValue
|
||||
text: cpfpfeebumper.target
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee for child')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.feeForChild
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Total fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.totalFee
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Total fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
text: cpfpfeebumper.valid ? cpfpfeebumper.totalFeeRate : ''
|
||||
font.family: FixedFont
|
||||
visible: feemethod.currentValue
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: feemethod.currentValue
|
||||
text: cpfpfeebumper.target
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee for child')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.feeForChild
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Total fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: cpfpfeebumper.totalFee
|
||||
valid: cpfpfeebumper.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Total fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
text: cpfpfeebumper.valid ? cpfpfeebumper.totalFeeRate : ''
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: cpfpfeebumper.valid
|
||||
text: 'sat/vB'
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.preferredWidth: parent.width * 3/4
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: constants.paddingLarge
|
||||
visible: cpfpfeebumper.warning != ''
|
||||
text: cpfpfeebumper.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: cpfpfeebumper.valid
|
||||
text: 'sat/vB'
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.preferredWidth: parent.width * 3/4
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: constants.paddingLarge
|
||||
visible: cpfpfeebumper.warning != ''
|
||||
text: cpfpfeebumper.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
Repeater {
|
||||
model: cpfpfeebumper.valid ? cpfpfeebumper.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
visible: cpfpfeebumper.valid
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: cpfpfeebumper.valid ? cpfpfeebumper.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
|
||||
|
||||
FlatButton {
|
||||
id: sendButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -26,201 +26,212 @@ ElDialog {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
GridLayout {
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.leftMargin: constants.paddingLarge
|
||||
Layout.rightMargin: constants.paddingLarge
|
||||
columns: 2
|
||||
Flickable {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Increase your transaction\'s fee to improve its position in the mempool')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
leftMargin: constants.paddingLarge
|
||||
rightMargin: constants.paddingLarge
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Method')
|
||||
color: Material.accentColor
|
||||
}
|
||||
contentHeight: rootLayout.height
|
||||
clip: true
|
||||
interactive: height < contentHeight
|
||||
|
||||
RowLayout {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
ElComboBox {
|
||||
enabled: rbffeebumper.canChangeBumpMethod
|
||||
GridLayout {
|
||||
id: rootLayout
|
||||
|
||||
textRole: 'text'
|
||||
valueRole: 'value'
|
||||
width: parent.width
|
||||
|
||||
model: [
|
||||
{ text: qsTr('Preserve payment'), value: 'preserve_payment' },
|
||||
{ text: qsTr('Decrease payment'), value: 'decrease_payment' }
|
||||
]
|
||||
onCurrentValueChanged: {
|
||||
if (activeFocus)
|
||||
rbffeebumper.bumpMethod = currentValue
|
||||
}
|
||||
Component.onCompleted: {
|
||||
currentIndex = indexOfValue(rbffeebumper.bumpMethod)
|
||||
}
|
||||
}
|
||||
Item { Layout.fillWidth: true; Layout.preferredHeight: 1 }
|
||||
}
|
||||
columns: 2
|
||||
|
||||
Label {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Old fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
amount: rbffeebumper.oldfee
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Old fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: oldfeeRate
|
||||
text: rbffeebumper.oldfeeRate
|
||||
font.family: FixedFont
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Increase your transaction\'s fee to improve its position in the mempool')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
Label {
|
||||
text: 'sat/vB'
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Method')
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Mining fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
RowLayout {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: bumpMethodComboBox.implicitWidth
|
||||
|
||||
FormattedAmount {
|
||||
amount: rbffeebumper.fee
|
||||
valid: rbffeebumper.valid
|
||||
}
|
||||
ElComboBox {
|
||||
id: bumpMethodComboBox
|
||||
enabled: rbffeebumper.canChangeBumpMethod
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
textRole: 'text'
|
||||
valueRole: 'value'
|
||||
|
||||
model: [
|
||||
{ text: qsTr('Preserve payment'), value: 'preserve_payment' },
|
||||
{ text: qsTr('Decrease payment'), value: 'decrease_payment' }
|
||||
]
|
||||
onCurrentValueChanged: {
|
||||
if (activeFocus)
|
||||
rbffeebumper.bumpMethod = currentValue
|
||||
}
|
||||
Component.onCompleted: {
|
||||
currentIndex = indexOfValue(rbffeebumper.bumpMethod)
|
||||
}
|
||||
}
|
||||
Item { Layout.fillWidth: true; Layout.preferredHeight: 1 }
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: feeRate
|
||||
text: rbffeebumper.valid ? rbffeebumper.feeRate : ''
|
||||
font.family: FixedFont
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Old fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
amount: rbffeebumper.oldfee
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Old fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: oldfeeRate
|
||||
text: rbffeebumper.oldfeeRate
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
text: 'sat/vB'
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Mining fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: rbffeebumper.fee
|
||||
valid: rbffeebumper.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: feeRate
|
||||
text: rbffeebumper.valid ? rbffeebumper.feeRate : ''
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: rbffeebumper.valid
|
||||
text: 'sat/vB'
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
id: targetdesc
|
||||
text: rbffeebumper.target
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.columnSpan: 2
|
||||
Slider {
|
||||
id: feeslider
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: rbffeebumper.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
rbffeebumper.sliderPos = value
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = rbffeebumper.sliderPos
|
||||
}
|
||||
Connections {
|
||||
target: rbffeebumper
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = rbffeebumper.sliderPos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: target
|
||||
feeslider: rbffeebumper
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
visible: rbffeebumper.warning != ''
|
||||
text: rbffeebumper.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: rbffeebumper.valid
|
||||
text: 'sat/vB'
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
Repeater {
|
||||
model: rbffeebumper.valid ? rbffeebumper.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
id: targetdesc
|
||||
text: rbffeebumper.target
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Slider {
|
||||
id: feeslider
|
||||
Layout.fillWidth: true
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: rbffeebumper.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
rbffeebumper.sliderPos = value
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = rbffeebumper.sliderPos
|
||||
}
|
||||
Connections {
|
||||
target: rbffeebumper
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = rbffeebumper.sliderPos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: target
|
||||
feeslider: rbffeebumper
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.preferredWidth: parent.width * 3/4
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
visible: rbffeebumper.warning != ''
|
||||
text: rbffeebumper.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: rbffeebumper.valid
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: rbffeebumper.valid ? rbffeebumper.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
|
||||
|
||||
FlatButton {
|
||||
id: sendButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -25,173 +25,183 @@ ElDialog {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
GridLayout {
|
||||
Flickable {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: constants.paddingLarge
|
||||
Layout.rightMargin: constants.paddingLarge
|
||||
Layout.fillHeight: true
|
||||
|
||||
columns: 2
|
||||
leftMargin: constants.paddingLarge
|
||||
rightMargin: constants.paddingLarge
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Cancel an unconfirmed RBF transaction by double-spending its inputs back to your wallet with a higher fee.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
contentHeight: rootLayout.height
|
||||
clip: true
|
||||
interactive: height < contentHeight
|
||||
|
||||
Label {
|
||||
text: qsTr('Old fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
GridLayout {
|
||||
id: rootLayout
|
||||
width: parent.width
|
||||
columns: 2
|
||||
|
||||
FormattedAmount {
|
||||
amount: txcanceller.oldfee
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Old fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: oldfeeRate
|
||||
text: txcanceller.oldfeeRate
|
||||
font.family: FixedFont
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('Cancel an unconfirmed RBF transaction by double-spending its inputs back to your wallet with a higher fee.')
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
Label {
|
||||
text: 'sat/vB'
|
||||
text: qsTr('Old fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Mining fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
FormattedAmount {
|
||||
amount: txcanceller.oldfee
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: txcanceller.fee
|
||||
valid: txcanceller.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: feeRate
|
||||
text: txcanceller.valid ? txcanceller.feeRate : ''
|
||||
font.family: FixedFont
|
||||
text: qsTr('Old fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: oldfeeRate
|
||||
text: txcanceller.oldfeeRate
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
text: 'sat/vB'
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Mining fee')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
FormattedAmount {
|
||||
amount: txcanceller.fee
|
||||
valid: txcanceller.valid
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Fee rate')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Label {
|
||||
id: feeRate
|
||||
text: txcanceller.valid ? txcanceller.feeRate : ''
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: txcanceller.valid
|
||||
text: 'sat/vB'
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Label {
|
||||
id: targetdesc
|
||||
text: txcanceller.target
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.columnSpan: 2
|
||||
Slider {
|
||||
id: feeslider
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: txcanceller.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
txcanceller.sliderPos = value
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = txcanceller.sliderPos
|
||||
}
|
||||
Connections {
|
||||
target: txcanceller
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = txcanceller.sliderPos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: target
|
||||
feeslider: txcanceller
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: final_cb
|
||||
text: qsTr('Replace-by-Fee')
|
||||
Layout.columnSpan: 2
|
||||
checked: txcanceller.rbf
|
||||
onCheckedChanged: {
|
||||
if (activeFocus)
|
||||
txcanceller.rbf = checked
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
visible: txcanceller.warning != ''
|
||||
text: txcanceller.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: txcanceller.valid
|
||||
text: 'sat/vB'
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Target')
|
||||
color: Material.accentColor
|
||||
}
|
||||
Repeater {
|
||||
model: txcanceller.valid ? txcanceller.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
Label {
|
||||
id: targetdesc
|
||||
text: txcanceller.target
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: feeslider
|
||||
leftPadding: constants.paddingMedium
|
||||
snapMode: Slider.SnapOnRelease
|
||||
stepSize: 1
|
||||
from: 0
|
||||
to: txcanceller.sliderSteps
|
||||
onValueChanged: {
|
||||
if (activeFocus)
|
||||
txcanceller.sliderPos = value
|
||||
}
|
||||
Component.onCompleted: {
|
||||
value = txcanceller.sliderPos
|
||||
}
|
||||
Connections {
|
||||
target: txcanceller
|
||||
function onSliderPosChanged() {
|
||||
feeslider.value = txcanceller.sliderPos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FeeMethodComboBox {
|
||||
id: target
|
||||
feeslider: txcanceller
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: final_cb
|
||||
text: qsTr('Replace-by-Fee')
|
||||
Layout.columnSpan: 2
|
||||
checked: txcanceller.rbf
|
||||
onCheckedChanged: {
|
||||
if (activeFocus)
|
||||
txcanceller.rbf = checked
|
||||
}
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.columnSpan: 2
|
||||
Layout.preferredWidth: parent.width * 3/4
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
visible: txcanceller.warning != ''
|
||||
text: txcanceller.warning
|
||||
iconStyle: InfoTextArea.IconStyle.Warn
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: txcanceller.valid
|
||||
text: qsTr('Outputs')
|
||||
Layout.columnSpan: 2
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: txcanceller.valid ? txcanceller.outputs : []
|
||||
delegate: TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: modelData.address
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
|
||||
|
||||
FlatButton {
|
||||
id: confirmButton
|
||||
Layout.fillWidth: true
|
||||
|
||||
Reference in New Issue
Block a user