Browse Source

add buttons in address drawers

also copies two kivy icons to gui/icons
patch-4
Sander van Grieken 3 years ago
parent
commit
62009c647e
  1. BIN
      electrum/gui/icons/globe.png
  2. BIN
      electrum/gui/icons/mail_icon.png
  3. 82
      electrum/gui/qml/components/Addresses.qml

BIN
electrum/gui/icons/globe.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
electrum/gui/icons/mail_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

82
electrum/gui/qml/components/Addresses.qml

@ -7,7 +7,7 @@ import org.electrum 1.0
Pane { Pane {
id: rootItem id: rootItem
padding: 0
property string title: Daemon.currentWallet.name + ' - ' + qsTr('Addresses') property string title: Daemon.currentWallet.name + ' - ' + qsTr('Addresses')
ColumnLayout { ColumnLayout {
@ -53,10 +53,9 @@ Pane {
ColumnLayout { ColumnLayout {
id: delegateLayout id: delegateLayout
// x: constants.paddingSmall
spacing: 0 spacing: 0
//width: parent.width - 2*constants.paddingSmall x: constants.paddingMedium
width: parent.width width: parent.width - 2*constants.paddingMedium
Item { Item {
Layout.preferredWidth: 1 Layout.preferredWidth: 1
@ -87,7 +86,7 @@ Pane {
? Qt.rgba(0.75,0.75,0.75,1) ? Qt.rgba(0.75,0.75,0.75,1)
: model.type == 'receive' : model.type == 'receive'
? Qt.rgba(0,1,0,0.5) ? Qt.rgba(0,1,0,0.5)
: Qt.rgba(1,0.93,0,0.25) : Qt.rgba(1,0.93,0,0.75)
} }
RowLayout { RowLayout {
@ -104,17 +103,21 @@ Pane {
Label { Label {
font.family: FixedFont font.family: FixedFont
text: Config.formatSats(model.balance, false) text: Config.formatSats(model.balance, false)
visible: model.balance > 0
} }
Label { Label {
color: Material.accentColor color: Material.accentColor
text: Config.baseUnit + ',' text: Config.baseUnit + ','
visible: model.balance > 0
} }
Label { Label {
text: model.numtx text: model.numtx
visible: model.numtx > 0
} }
Label { Label {
color: Material.accentColor color: Material.accentColor
text: qsTr('tx') text: qsTr('tx')
visible: model.numtx > 0
} }
} }
} }
@ -123,13 +126,57 @@ Pane {
id: drawer id: drawer
visible: false visible: false
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 50 Layout.preferredHeight: copyButton.height
ToolButton { ToolButton {
icon.source: '../../icons/qrcode.png' id: copyButton
icon.source: '../../icons/copy.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: copy address')
}
ToolButton {
icon.source: '../../icons/info.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: show details screen')
}
ToolButton {
icon.source: '../../icons/key.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: sign/verify dialog')
}
ToolButton {
icon.source: '../../icons/mail_icon.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: encrypt/decrypt message dialog')
}
ToolButton {
icon.source: '../../icons/globe.png'
icon.color: 'transparent' icon.color: 'transparent'
icon.width: constants.iconSizeMedium icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: show on block explorer')
}
ToolButton {
icon.source: '../../icons/unlock.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: freeze/unfreeze')
}
ToolButton {
icon.source: '../../icons/tab_send.png'
icon.color: 'transparent'
icon.width: constants.iconSizeMedium
icon.height: constants.iconSizeMedium
onClicked: console.log('TODO: spend from address')
} }
} }
@ -156,16 +203,25 @@ Pane {
required property string section required property string section
GridLayout { RowLayout {
x: constants.paddingMedium
width: parent.width - 2 * constants.paddingMedium
Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
color: Material.accentColor
}
Label { Label {
topPadding: constants.paddingMedium padding: constants.paddingMedium
bottomPadding: constants.paddingMedium
text: root.section + ' ' + qsTr('addresses') text: root.section + ' ' + qsTr('addresses')
font.bold: true font.bold: true
font.pixelSize: constants.fontSizeLarge font.pixelSize: constants.fontSizeMedium
} }
ToolButton { Rectangle {
Layout.preferredHeight: 1
Layout.fillWidth: true
color: Material.accentColor
} }
} }
} }

Loading…
Cancel
Save