Browse Source

request dialog improve, icons

patch-4
Sander van Grieken 3 years ago
parent
commit
50e7c082cd
  1. BIN
      electrum/gui/icons/copy_bw.png
  2. BIN
      electrum/gui/icons/delete.png
  3. BIN
      electrum/gui/icons/share.png
  4. 67
      electrum/gui/qml/components/RequestDialog.qml

BIN
electrum/gui/icons/copy_bw.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

BIN
electrum/gui/icons/delete.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

BIN
electrum/gui/icons/share.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

67
electrum/gui/qml/components/RequestDialog.qml

@ -34,19 +34,18 @@ Dialog {
font.bold: true font.bold: true
font.pixelSize: 16 font.pixelSize: 16
} }
ToolButton {
Layout.alignment: Qt.AlignBaseline
icon.source: '../../icons/closebutton.png'
icon.color: 'transparent'
icon.width: 32
icon.height: 32
onClicked: dialog.close()
visible: false
}
} }
Flickable {
anchors.fill: parent
contentHeight: rootLayout.height
clip:true
interactive: height < contentHeight
GridLayout { GridLayout {
id: rootLayout
width: parent.width width: parent.width
rowSpacing: constants.paddingXLarge rowSpacing: constants.paddingMedium
columns: 3 columns: 3
Rectangle { Rectangle {
@ -59,6 +58,9 @@ Dialog {
Image { Image {
Layout.columnSpan: 3 Layout.columnSpan: 3
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.topMargin: constants.paddingSmall
Layout.bottomMargin: constants.paddingSmall
source: 'image://qrgen/' + modelItem.address source: 'image://qrgen/' + modelItem.address
Rectangle { Rectangle {
@ -87,6 +89,29 @@ Dialog {
color: Material.accentColor color: Material.accentColor
} }
RowLayout {
Layout.columnSpan: 3
Layout.alignment: Qt.AlignHCenter
Button {
icon.source: '../../icons/delete.png'
text: qsTr('Delete')
onClicked: {
Daemon.currentWallet.delete_request(modelItem.key)
dialog.close()
}
}
Button {
icon.source: '../../icons/copy_bw.png'
icon.color: 'transparent'
text: 'Copy'
enabled: false
}
Button {
icon.source: '../../icons/share.png'
text: 'Share'
enabled: false
}
}
Label { Label {
visible: modelItem.message != '' visible: modelItem.message != ''
text: qsTr('Description') text: qsTr('Description')
@ -129,8 +154,7 @@ Dialog {
text: modelItem.address text: modelItem.address
} }
ToolButton { ToolButton {
icon.source: '../../icons/copy.png' icon.source: '../../icons/copy_bw.png'
icon.color: 'transparent'
onClicked: { onClicked: {
AppController.textToClipboard(modelItem.address) AppController.textToClipboard(modelItem.address)
} }
@ -146,25 +170,6 @@ Dialog {
text: modelItem.status text: modelItem.status
} }
RowLayout {
Layout.columnSpan: 3
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
Button {
text: 'Delete'
onClicked: {
Daemon.currentWallet.delete_request(modelItem.key)
dialog.close()
}
}
Button {
text: 'Copy'
enabled: false
}
Button {
text: 'Share'
enabled: false
}
} }
} }

Loading…
Cancel
Save