1
0

qml: background flatbuttons within pages

This commit is contained in:
Sander van Grieken
2023-03-03 15:50:13 +01:00
parent b16fb5088b
commit ba888fc9fa
3 changed files with 59 additions and 40 deletions

View File

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

View File

@@ -217,11 +217,17 @@ Pane {
} }
} }
Button { Pane {
text: qsTr('Modify') background: Rectangle { color: Material.dialogColor }
padding: 0
visible: Config.pinCode != '' visible: Config.pinCode != ''
FlatButton {
text: qsTr('Modify')
onClicked: { onClicked: {
var dialog = pinSetup.createObject(preferences, {mode: 'change', pincode: Config.pinCode}) var dialog = pinSetup.createObject(preferences, {
mode: 'change',
pincode: Config.pinCode
})
dialog.accepted.connect(function() { dialog.accepted.connect(function() {
Config.pinCode = dialog.pincode Config.pinCode = dialog.pincode
dialog.close() dialog.close()
@@ -229,6 +235,7 @@ Pane {
dialog.open() dialog.open()
} }
} }
}
RowLayout { RowLayout {
Layout.columnSpan: 2 Layout.columnSpan: 2

View File

@@ -136,9 +136,12 @@ Pane {
} }
ColumnLayout { ColumnLayout {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
visible: txdetails.canBump || txdetails.canCpfp
FlatButton { FlatButton {
id: feebumpButton id: feebumpButton
visible: txdetails.canBump || txdetails.canCpfp
textUnderIcon: false textUnderIcon: false
icon.source: '../../icons/add.png' icon.source: '../../icons/add.png'
text: qsTr('Bump fee') text: qsTr('Bump fee')
@@ -151,9 +154,13 @@ Pane {
dialog.open() dialog.open()
} }
} }
}
Pane {
background: Rectangle { color: Material.dialogColor }
padding: 0
visible: txdetails.canCancel
FlatButton { FlatButton {
id: cancelButton id: cancelButton
visible: txdetails.canCancel
textUnderIcon: false textUnderIcon: false
icon.source: '../../icons/closebutton.png' icon.source: '../../icons/closebutton.png'
text: qsTr('Cancel Tx') text: qsTr('Cancel Tx')
@@ -164,6 +171,7 @@ Pane {
} }
} }
} }
}
} }