1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-20 04:15:53 +01:00

Dynamic subaddr table height, dont show history table when there is none

This commit is contained in:
Sander Ferdinand 2018-03-21 02:39:09 +01:00 committed by moneromooo-monero
parent 57c0477fc6
commit 5213daad77
5 changed files with 28 additions and 15 deletions

View File

@ -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

View File

@ -259,6 +259,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
@ -274,6 +284,7 @@ Rectangle {
Rectangle {
id: header
Layout.fillWidth: true
visible: table.count > 0
height: 10
color: "transparent"

View File

@ -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 {

View File

@ -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>\

View File

@ -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
}