aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-03-21 02:39:09 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:03 +0100
commit5213daad77940ba6162c8c772e5da4213ad6f962 (patch)
treeb78bdb11eeb6f989817f5c513870d02bb570aafc
parent57c0477fc6efeb6ce618ed35d27dd29820c29ee5 (diff)
downloadmonzero-gui-5213daad77940ba6162c8c772e5da4213ad6f962.tar.gz
monzero-gui-5213daad77940ba6162c8c772e5da4213ad6f962.tar.xz
monzero-gui-5213daad77940ba6162c8c772e5da4213ad6f962.zip
Dynamic subaddr table height, dont show history table when there is none
-rw-r--r--components/SubaddressTable.qml6
-rw-r--r--pages/History.qml11
-rw-r--r--pages/Receive.qml4
-rw-r--r--pages/Transfer.qml2
-rw-r--r--pages/TxKey.qml20
5 files changed, 28 insertions, 15 deletions
diff --git a/components/SubaddressTable.qml b/components/SubaddressTable.qml
index 027a57ad..12f06d1c 100644
--- a/components/SubaddressTable.qml
+++ b/components/SubaddressTable.qml
@@ -28,6 +28,7 @@
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
+import "../components"
import "." 1.0
ListView {
@@ -42,7 +43,7 @@ ListView {
delegate: Rectangle {
id: delegate
height: 74
- color: 'black';
+ color: 'transparent';
anchors.topMargin: 0
width: listView.width
@@ -57,9 +58,8 @@ ListView {
anchors.right: parent.right
anchors.leftMargin: 5
anchors.topMargin: 12
- anchors.rightMargin: 40
+ anchors.rightMargin: 44
anchors.bottomMargin: 0
- onTextChanged: cursorPosition = 0
text: address
showingHeader: false
diff --git a/pages/History.qml b/pages/History.qml
index ad4bbb60..a1f3142a 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -260,6 +260,16 @@ Rectangle {
}
GridLayout {
+ Layout.topMargin: 20
+ visible: table.count === 0
+
+ Label {
+ fontSize: 16 * scaleRatio
+ text: qsTr("No history yet...") + translationManager.emptyString
+ }
+ }
+
+ GridLayout {
id: tableHeader
columns: 1
columnSpacing: 0
@@ -274,6 +284,7 @@ Rectangle {
Rectangle {
id: header
Layout.fillWidth: true
+ visible: table.count > 0
height: 10
color: "transparent"
diff --git a/pages/Receive.qml b/pages/Receive.qml
index ee028395..774f92c6 100644
--- a/pages/Receive.qml
+++ b/pages/Receive.qml
@@ -171,6 +171,7 @@ Rectangle {
id: header
Layout.fillWidth: true
Layout.topMargin: 10
+ visible: table.count > 0
height: 10
color: "transparent"
@@ -210,8 +211,9 @@ Rectangle {
Rectangle {
id: tableRect
+ property int table_max_height: 240
Layout.fillWidth: true
- Layout.preferredHeight: 240
+ Layout.preferredHeight: table.contentHeight < table_max_height ? table.contentHeight : table_max_height
color: "transparent"
Scroll {
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index b5fbfbea..a52a8f92 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -202,7 +202,7 @@ Rectangle {
id: addressLineRow
Layout.fillWidth: true
- LineEditMulti{
+ LineEditMulti {
id: addressLine
spacing: 0
inputLabelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
diff --git a/pages/TxKey.qml b/pages/TxKey.qml
index a9f571ba..18a65abf 100644
--- a/pages/TxKey.qml
+++ b/pages/TxKey.qml
@@ -45,12 +45,12 @@ Rectangle {
/* main layout */
ColumnLayout {
id: mainLayout
- anchors.margins: 40
+ anchors.margins: 40 * scaleRatio
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
- spacing: 20
+ spacing: 20 * scaleRatio
// solo
ColumnLayout {
@@ -58,11 +58,11 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
- spacing: 20
+ spacing: 20 * scaleRatio
Label {
id: soloTitleLabel
- fontSize: 24
+ fontSize: 24 * scaleRatio
text: qsTr("Prove Transaction") + translationManager.emptyString
}
@@ -115,8 +115,8 @@ Rectangle {
StandardButton {
anchors.left: parent.left
- anchors.topMargin: 17
- width: 60
+ anchors.topMargin: 17 * scaleRatio
+ width: 60 * scaleRatio
text: qsTr("Generate") + translationManager.emptyString
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.testnet))
onClicked: {
@@ -131,13 +131,13 @@ Rectangle {
color: "#404040"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
- anchors.bottomMargin: 3
+ anchors.bottomMargin: 3 * scaleRatio
}
Label {
id: soloTitleLabel2
- fontSize: 24
+ fontSize: 24 * scaleRatio
text: qsTr("Check Transaction") + translationManager.emptyString
}
@@ -205,7 +205,7 @@ Rectangle {
StandardButton {
anchors.left: parent.left
- anchors.topMargin: 17
+ anchors.topMargin: 17 * scaleRatio
width: 60
text: qsTr("Check") + translationManager.emptyString
enabled: TxUtils.checkTxID(checkProofTxIdLine.text) && TxUtils.checkSignature(checkProofSignatureLine.text) && ((checkProofSignatureLine.text.indexOf("SpendProofV") === 0 && checkProofAddressLine.text.length == 0) || (checkProofSignatureLine.text.indexOf("SpendProofV") !== 0 && TxUtils.checkAddress(checkProofAddressLine.text, appWindow.persistentSettings.testnet)))
@@ -221,7 +221,7 @@ Rectangle {
color: "#404040"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
- anchors.bottomMargin: 3
+ anchors.bottomMargin: 3 * scaleRatio
}