1
mirror of https://github.com/monero-project/monero-gui synced 2025-03-26 04:22:43 +01:00

History: display blockheight, sort by blockheight

This commit is contained in:
Ilya Kitaev 2016-10-11 01:28:06 +03:00
parent b1454c6a13
commit f8f94e048b
3 changed files with 62 additions and 28 deletions

@ -119,15 +119,21 @@ ListView {
// visible: !descriptionArea.containsMouse // visible: !descriptionArea.containsMouse
} }
} }
Row {
// - Payment ID + block height row
id: row2
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 40
anchors.leftMargin: 26
// -- "PaymentID" title // -- "PaymentID" title
Text { Text {
id: paymentLabel id: paymentLabel
anchors.left: parent.left width: 86
anchors.top: row1.bottom anchors.bottom: parent.bottom
anchors.topMargin: 4
anchors.leftMargin: 28
width: 118
font.family: "Arial" font.family: "Arial"
font.pixelSize: 12 font.pixelSize: 12
font.letterSpacing: -1 font.letterSpacing: -1
@ -136,19 +142,41 @@ ListView {
} }
// -- "PaymentID" value // -- "PaymentID" value
Text { Text {
anchors.bottom: paymentLabel.bottom id: paymentIdValue
anchors.left: paymentLabel.right width: 136
anchors.right: parent.right anchors.bottom: parent.bottom
anchors.leftMargin: 12 elide: Text.ElideRight
anchors.rightMargin: 12 font.family: "Arial"
font.pixelSize:13
font.letterSpacing: -1
color: "#545454"
text: paymentId
}
// -- "BlockHeight" title
Text {
id: blockHeghtTitle
anchors.bottom: parent.bottom
width: 86
font.family: "Arial"
font.pixelSize: 12
font.letterSpacing: -1
color: "#535353"
text: qsTr("BlockHeight:") + translationManager.emptyString
}
// -- "BlockHeight" value
Text {
width: 85
anchors.bottom: parent.bottom
elide: Text.ElideRight elide: Text.ElideRight
font.family: "Arial" font.family: "Arial"
font.pixelSize: 13 font.pixelSize: 13
font.letterSpacing: -1 font.letterSpacing: -1
color: "#545454" color: "#545454"
text: paymentId text: blockHeight
} }
}
// -- "Date", "Balance" and "Amound" section // -- "Date", "Balance" and "Amound" section
Row { Row {
anchors.left: parent.left anchors.left: parent.left

@ -44,10 +44,11 @@ Window {
ColumnLayout { ColumnLayout {
id: rootLayout id: rootLayout
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 30 anchors.leftMargin: 30
anchors.rightMargin: 30 anchors.rightMargin: 30

@ -370,6 +370,7 @@ Rectangle {
ListElement { columnName: "Payment ID"; columnWidth: 127 } ListElement { columnName: "Payment ID"; columnWidth: 127 }
ListElement { columnName: "Date"; columnWidth: 100 } ListElement { columnName: "Date"; columnWidth: 100 }
ListElement { columnName: "BlockHeight"; columnWidth: 150 }
ListElement { columnName: "Amount"; columnWidth: 148 } ListElement { columnName: "Amount"; columnWidth: 148 }
// ListElement { columnName: "Description"; columnWidth: 148 } // ListElement { columnName: "Description"; columnWidth: 148 }
} }
@ -396,6 +397,10 @@ Rectangle {
model.sortRole = TransactionHistoryModel.TransactionDateRole model.sortRole = TransactionHistoryModel.TransactionDateRole
break; break;
case 2: case 2:
// BlockHeight;
model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
break;
case 3:
// Amount; // Amount;
model.sortRole = TransactionHistoryModel.TransactionAmountRole model.sortRole = TransactionHistoryModel.TransactionAmountRole
break; break;