Merge pull request #2251

5f5f210 History: dynamic number of tx rows (selsta)
This commit is contained in:
luigi1111 2019-07-12 20:36:52 -05:00
commit b3402b3d4e
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -49,9 +49,9 @@ Rectangle {
property var model property var model
property int sideMargin: 50 property int sideMargin: 50
property var initialized: false property var initialized: false
property int txMax: 5 property int txMax: Math.max(5, ((appWindow.height - 250) / 60))
property int txOffset: 0 property int txOffset: 0
property int txPage: (txOffset / 5) + 1 property int txPage: (txOffset / txMax) + 1
property int txCount: 0 property int txCount: 0
property var sortSearchString: null property var sortSearchString: null
property bool sortDirection: true // true = desc, false = asc property bool sortDirection: true // true = desc, false = asc
@ -67,6 +67,8 @@ Rectangle {
color: "transparent" color: "transparent"
onTxMaxChanged: root.updateDisplay(root.txOffset, root.txMax);
ColumnLayout { ColumnLayout {
id: pageRoot id: pageRoot
anchors.topMargin: 40 anchors.topMargin: 40
@ -1345,7 +1347,6 @@ Rectangle {
function reset() { function reset() {
root.txOffset = 0; root.txOffset = 0;
root.txMax = 5;
if (typeof root.model !== 'undefined' && root.model != null) { if (typeof root.model !== 'undefined' && root.model != null) {
root.model.dateFromFilter = "2014-04-18" // genesis block root.model.dateFromFilter = "2014-04-18" // genesis block