Browse Source

ui history page

patch-4
Sander van Grieken 3 years ago
parent
commit
4680521d07
  1. 67
      electrum/gui/qml/components/History.qml

67
electrum/gui/qml/components/History.qml

@ -1,6 +1,7 @@
import QtQuick 2.6 import QtQuick 2.6
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.0
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Material 2.0
import org.electrum 1.0 import org.electrum 1.0
@ -16,18 +17,6 @@ Pane {
model: Daemon.currentWallet.historyModel model: Daemon.currentWallet.historyModel
header: Item {
id: header
width: ListView.view.width
height: balance.height
BalanceSummary {
id: balance
width: parent.width
}
}
delegate: Item { delegate: Item {
id: delegate id: delegate
width: ListView.view.width width: ListView.view.width
@ -40,23 +29,11 @@ Pane {
GridLayout { GridLayout {
id: txinfo id: txinfo
columns: 4 columns: 3
x: 6 x: 6
width: delegate.width - 12 width: delegate.width - 12
Item {
id: indicator
Layout.fillHeight: true
Layout.rowSpan: 2
Rectangle {
width: 3
color: model.incoming ? 'green' : 'red'
y: 2
height: parent.height - 4
}
}
Image { Image {
readonly property variant tx_icons : [ readonly property variant tx_icons : [
"../../../gui/icons/unconfirmed.png", "../../../gui/icons/unconfirmed.png",
@ -68,38 +45,32 @@ Pane {
"../../../gui/icons/confirmed.png" "../../../gui/icons/confirmed.png"
] ]
sourceSize.width: 48 Layout.preferredWidth: 32
sourceSize.height: 48 Layout.preferredHeight: 32
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Layout.rowSpan: 2
source: tx_icons[Math.min(6,model.confirmations)] source: tx_icons[Math.min(6,model.confirmations)]
} }
Column {
Layout.fillWidth: true
Label { Label {
font.pointSize: 12 font.pixelSize: 18
Layout.fillWidth: true
text: model.label !== '' ? model.label : '<no label>' text: model.label !== '' ? model.label : '<no label>'
color: model.label !== '' ? 'black' : 'gray' color: model.label !== '' ? Material.accentColor : 'gray'
font.bold: model.label !== '' ? true : false
}
Label {
font.pointSize: 7
text: model.date
} }
}
Column {
id: valuefee
Label { Label {
font.pointSize: 12 font.pixelSize: 15
text: model.bc_value text: model.bc_value
font.bold: true font.bold: true
color: model.incoming ? "#ff80ff80" : "#ffff8080"
} }
Label { Label {
font.pointSize: 6 font.pixelSize: 12
text: 'fee: ' + (model.fee !== undefined ? model.fee : '0') text: model.date
} }
Label {
font.pixelSize: 10
text: 'fee: ' + (model.fee !== undefined ? model.fee : '0')
} }
GridLayout { GridLayout {
@ -110,24 +81,24 @@ Pane {
Label { text: 'txid' } Label { text: 'txid' }
Label { Label {
font.pointSize: 6 font.pixelSize: 10
text: model.txid text: model.txid
elide: Text.ElideMiddle elide: Text.ElideMiddle
Layout.fillWidth: true Layout.fillWidth: true
} }
Label { text: 'height' } Label { text: 'height' }
Label { Label {
font.pointSize: 7 font.pixelSize: 10
text: model.height text: model.height
} }
Label { text: 'confirmations' } Label { text: 'confirmations' }
Label { Label {
font.pointSize: 7 font.pixelSize: 10
text: model.confirmations text: model.confirmations
} }
Label { text: 'address' } Label { text: 'address' }
Label { Label {
font.pointSize: 7 font.pixelSize: 10
elide: Text.ElideMiddle elide: Text.ElideMiddle
Layout.fillWidth: true Layout.fillWidth: true
text: { text: {

Loading…
Cancel
Save