aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authormarcin <z.krzysztoff7@gmail.com>2014-07-17 13:01:12 +0200
committermarcin <z.krzysztoff7@gmail.com>2014-07-17 13:01:12 +0200
commit98c208280821f9cc76579218aa8266ce4f865d9f (patch)
treed9568f5bd334ab7f7ef58a3e060b5b57540e1ca9 /components
parent6dbe05d79d0d22d599ab88f22b0c53499650cdfe (diff)
downloadmonzero-gui-98c208280821f9cc76579218aa8266ce4f865d9f.tar.gz
monzero-gui-98c208280821f9cc76579218aa8266ce4f865d9f.tar.xz
monzero-gui-98c208280821f9cc76579218aa8266ce4f865d9f.zip
https://trello.com/c/X0neSDZ0/34-changes-to-history-tab-columns-drop-down-etc-as-discussed
https://trello.com/c/uksby2dk/43-create-history-page
Diffstat (limited to 'components')
-rw-r--r--components/DatePicker.qml22
-rw-r--r--components/HistoryTable.qml36
2 files changed, 54 insertions, 4 deletions
diff --git a/components/DatePicker.qml b/components/DatePicker.qml
index 7a974ea8..a41703d2 100644
--- a/components/DatePicker.qml
+++ b/components/DatePicker.qml
@@ -110,6 +110,12 @@ Item {
return day < 10 ? "0" + day : day
}
}
+ onFocusChanged: {
+ if(focus === false) {
+ if(text.length === 0 || text === "0" || text === "00") text = "01"
+ else if(text.length === 1) text = "0" + text
+ }
+ }
}
Text {
@@ -135,6 +141,12 @@ Item {
return month < 10 ? "0" + month : month
}
}
+ onFocusChanged: {
+ if(focus === false) {
+ if(text.length === 0 || text === "0" || text === "00") text = "01"
+ else if(text.length === 1) text = "0" + text
+ }
+ }
}
Text {
@@ -152,8 +164,16 @@ Item {
color: "#525252"
maximumLength: 4
horizontalAlignment: TextInput.AlignHCenter
- validator: IntValidator{bottom: 2000; top: 2100;}
+ validator: IntValidator{bottom: 1000; top: 9999;}
text: if(datePicker.showCurrentDate) datePicker.currentDate.getFullYear()
+ onFocusChanged: {
+ if(focus === false) {
+ var d = new Date()
+ var y = d.getFullYear()
+ if(text.length != 4 || text[0] === "0")
+ text = y
+ }
+ }
}
}
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml
index c280fa10..c07b41c2 100644
--- a/components/HistoryTable.qml
+++ b/components/HistoryTable.qml
@@ -9,7 +9,7 @@ ListView {
property var previousItem
delegate: Rectangle {
id: delegate
- height: 90
+ height: 114
width: listView.width
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
function collapseDropdown() { dropdown.expanded = false }
@@ -71,10 +71,40 @@ ListView {
}
}
- Row {
+ Text {
+ id: paymentLabel
anchors.left: parent.left
anchors.top: row1.bottom
- anchors.topMargin: 8
+ anchors.topMargin: 4
+ anchors.leftMargin: 28
+
+ width: 118
+ font.family: "Arial"
+ font.pixelSize: 12
+ font.letterSpacing: -1
+ color: "#535353"
+ text: qsTr("Payment ID:")
+ }
+
+ Text {
+ anchors.bottom: paymentLabel.bottom
+ anchors.left: paymentLabel.right
+ anchors.right: parent.right
+ anchors.leftMargin: 12
+ anchors.rightMargin: 12
+
+ elide: Text.ElideRight
+ font.family: "Arial"
+ font.pixelSize: 13
+ font.letterSpacing: -1
+ color: "#545454"
+ text: paymentId
+ }
+
+ Row {
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 11
spacing: 12
Item { //separator