Browse Source

qml: background flatbuttons within pages

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

12
electrum/gui/qml/components/ChannelDetails.qml

@ -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

13
electrum/gui/qml/components/Preferences.qml

@ -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

12
electrum/gui/qml/components/TxDetails.qml

@ -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 {
} }
} }
} }
}
} }

Loading…
Cancel
Save