history table - improved mobile layout

This commit is contained in:
Jaquee 2017-11-02 07:52:01 +01:00
parent 2170f6a46d
commit 394b20ee36

View file

@ -80,26 +80,14 @@ ListView {
delegate: Rectangle { delegate: Rectangle {
id: delegate id: delegate
height: tableContent.height + 10 * scaleRatio height: tableContent.height + 20 * scaleRatio
width: listView.width width: listView.width
color: index % 2 ? "#F8F8F8" : "#FFFFFF" color: index % 2 ? "#F8F8F8" : "#FFFFFF"
Layout.leftMargin: 10 * scaleRatio
z: listView.count - index z: listView.count - index
function collapseDropdown() { dropdown.expanded = false } function collapseDropdown() { dropdown.expanded = false }
MouseArea {
StandardButton { anchors.fill: parent
id: detailsButton
anchors.right:parent.right
anchors.rightMargin: 15 * scaleRatio
anchors.top: parent.top
anchors.topMargin: parent.height/2 - this.height/2
width: 40 * scaleRatio
height: 20 * scaleRatio
fontSize: 6 * scaleRatio
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Details")
onClicked: { onClicked: {
var tx_key = currentWallet.getTxKey(hash) var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash) var tx_note = currentWallet.getUserNote(hash)
@ -111,23 +99,40 @@ ListView {
} }
} }
Rectangle {
anchors.right: parent.right
anchors.rightMargin: 15 * scaleRatio
anchors.top: parent.top
anchors.topMargin: parent.height/2 - this.height/2
width: 30 * scaleRatio; height: 30 * scaleRatio
radius: 25
color: "#FF4304"
Image {
width: 20 * scaleRatio
height: 20 * scaleRatio
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
source: "qrc:///images/nextPage.png"
}
}
ColumnLayout { ColumnLayout {
id: tableContent id: tableContent
// Date // Date
RowLayout { RowLayout {
Layout.topMargin: 10 * scaleRatio Layout.topMargin: 20 * scaleRatio
Layout.leftMargin: 10 * scaleRatio Layout.leftMargin: 10 * scaleRatio
Text { Text {
font.family: "Arial" font.family: "Arial"
font.pixelSize: 10 * scaleRatio font.pixelSize: 14 * scaleRatio
color: "#555555" color: "#555555"
text: date text: date
} }
Text { Text {
font.family: "Arial" font.family: "Arial"
font.pixelSize: 10 * scaleRatio font.pixelSize: 14 * scaleRatio
color: "#555555" color: "#555555"
text: time text: time
} }
@ -137,7 +142,7 @@ ListView {
visible: confirmations < confirmationsRequired || isPending visible: confirmations < confirmationsRequired || isPending
Layout.leftMargin: 5 * scaleRatio Layout.leftMargin: 5 * scaleRatio
font.family: "Arial" font.family: "Arial"
font.pixelSize: 10 * scaleRatio font.pixelSize: 14 * scaleRatio
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454" color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
text: { text: {
if (!isPending) if (!isPending)
@ -158,7 +163,7 @@ ListView {
spacing: 2 spacing: 2
Text { Text {
font.family: "Arial" font.family: "Arial"
font.pixelSize: 10 * scaleRatio font.pixelSize: 14 * scaleRatio
color: isOut ? "#FF4F41" : "#36B05B" color: isOut ? "#FF4F41" : "#36B05B"
text: isOut ? "↓" : "↑" text: isOut ? "↓" : "↑"
} }
@ -166,7 +171,7 @@ ListView {
Text { Text {
id: amountText id: amountText
font.family: "Arial" font.family: "Arial"
font.pixelSize: 14 * scaleRatio font.pixelSize: 18 * scaleRatio
color: isOut ? "#FF4F41" : "#36B05B" color: isOut ? "#FF4F41" : "#36B05B"
text: displayAmount text: displayAmount
} }