Browse Source

qml: background flatbuttons within pages

master
Sander van Grieken 3 years ago
parent
commit
ba888fc9fa
  1. 28
      electrum/gui/qml/components/ChannelDetails.qml
  2. 25
      electrum/gui/qml/components/Preferences.qml
  3. 46
      electrum/gui/qml/components/TxDetails.qml

28
electrum/gui/qml/components/ChannelDetails.qml

@ -108,12 +108,14 @@ Pane {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
FlatButton {
Layout.minimumWidth: implicitWidth
// icon.source: '../../icons/warning.png'
// icon.color: 'transparent'
text: channeldetails.frozenForSending ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForSending()
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForSending ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForSending()
}
}
}
@ -143,12 +145,14 @@ Pane {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
FlatButton {
Layout.minimumWidth: implicitWidth
// icon.source: '../../icons/warning.png'
// icon.color: 'transparent'
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForReceiving()
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
FlatButton {
Layout.minimumWidth: implicitWidth
text: channeldetails.frozenForReceiving ? qsTr('Unfreeze') : qsTr('Freeze')
onClicked: channeldetails.freezeForReceiving()
}
}
}

25
electrum/gui/qml/components/Preferences.qml

@ -217,16 +217,23 @@ Pane {
}
}
Button {
text: qsTr('Modify')
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
visible: Config.pinCode != ''
onClicked: {
var dialog = pinSetup.createObject(preferences, {mode: 'change', pincode: Config.pinCode})
dialog.accepted.connect(function() {
Config.pinCode = dialog.pincode
dialog.close()
})
dialog.open()
FlatButton {
text: qsTr('Modify')
onClicked: {
var dialog = pinSetup.createObject(preferences, {
mode: 'change',
pincode: Config.pinCode
})
dialog.accepted.connect(function() {
Config.pinCode = dialog.pincode
dialog.close()
})
dialog.open()
}
}
}

46
electrum/gui/qml/components/TxDetails.qml

@ -136,30 +136,38 @@ Pane {
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
FlatButton {
id: feebumpButton
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
visible: txdetails.canBump || txdetails.canCpfp
textUnderIcon: false
icon.source: '../../icons/add.png'
text: qsTr('Bump fee')
onClicked: {
if (txdetails.canBump) {
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
} else {
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
FlatButton {
id: feebumpButton
textUnderIcon: false
icon.source: '../../icons/add.png'
text: qsTr('Bump fee')
onClicked: {
if (txdetails.canBump) {
var dialog = rbfBumpFeeDialog.createObject(root, { txid: root.txid })
} else {
var dialog = cpfpBumpFeeDialog.createObject(root, { txid: root.txid })
}
dialog.open()
}
dialog.open()
}
}
FlatButton {
id: cancelButton
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
visible: txdetails.canCancel
textUnderIcon: false
icon.source: '../../icons/closebutton.png'
text: qsTr('Cancel Tx')
onClicked: {
var dialog = rbfCancelDialog.createObject(root, { txid: root.txid })
dialog.open()
FlatButton {
id: cancelButton
textUnderIcon: false
icon.source: '../../icons/closebutton.png'
text: qsTr('Cancel Tx')
onClicked: {
var dialog = rbfCancelDialog.createObject(root, { txid: root.txid })
dialog.open()
}
}
}
}

Loading…
Cancel
Save