Cleanup advanced pages

This commit is contained in:
dsc 2019-02-01 22:20:38 +01:00
parent c7f3deb5cc
commit a3128c9103
No known key found for this signature in database
GPG key ID: 7BBC83D7A8810AAB
4 changed files with 230 additions and 264 deletions

View file

@ -39,13 +39,13 @@ Rectangle {
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
Layout.fillWidth: true
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
anchors.topMargin: 40 * scaleRatio anchors.topMargin: 40 * scaleRatio
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
spacing: 20 * scaleRatio spacing: 20 * scaleRatio
Layout.fillWidth: true
MoneroComponents.Label { MoneroComponents.Label {
id: soloTitleLabel id: soloTitleLabel
@ -53,11 +53,9 @@ Rectangle {
text: qsTr("Solo mining") + translationManager.emptyString text: qsTr("Solo mining") + translationManager.emptyString
} }
MoneroComponents.Label { MoneroComponents.WarningBox {
id: soloLocalDaemonsLabel Layout.bottomMargin: 8 * scaleRatio
fontSize: 18 * scaleRatio text: qsTr("Mining is only available on local daemons.") + translationManager.emptyString
color: "#D02020"
text: qsTr("(only available for local daemons)") + translationManager.emptyString
visible: !walletManager.isDaemonLocal(appWindow.currentDaemonAddress) visible: !walletManager.isDaemonLocal(appWindow.currentDaemonAddress)
} }

View file

@ -32,7 +32,7 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import "../components" import "../components" as MoneroComponents
import moneroComponents.Clipboard 1.0 import moneroComponents.Clipboard 1.0
Rectangle { Rectangle {
@ -79,6 +79,7 @@ Rectangle {
/* main layout */ /* main layout */
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
Layout.fillWidth: true
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
anchors.topMargin: 40 * scaleRatio anchors.topMargin: 40 * scaleRatio
@ -87,16 +88,13 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
spacing: 20 * scaleRatio spacing: 20 * scaleRatio
property int labelWidth: 120
property int editWidth: 400
property int lineEditFontSize: 14 * scaleRatio
MessageDialog { MessageDialog {
id: sharedRingDBDialog id: sharedRingDBDialog
standardButtons: StandardButton.Ok standardButtons: StandardButton.Ok
} }
Label { MoneroComponents.Label {
id: signTitleLabel id: signTitleLabel
fontSize: 24 * scaleRatio fontSize: 24 * scaleRatio
text: qsTr("Shared RingDB") + translationManager.emptyString text: qsTr("Shared RingDB") + translationManager.emptyString
@ -107,12 +105,12 @@ Rectangle {
"This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString "This database is meant for use by Monero wallets as well as wallets from Monero clones which reuse the Monero keys.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
LabelSubheader { MoneroComponents.LabelSubheader {
Layout.fillWidth: true Layout.fillWidth: true
textFormat: Text.RichText textFormat: Text.RichText
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" + text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>" +
@ -138,13 +136,13 @@ Rectangle {
Text { Text {
textFormat: Text.RichText textFormat: Text.RichText
font.family: Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
text: qsTr("This sets which outputs are known to be spent, and thus not to be used as privacy placeholders in ring signatures. ") + text: qsTr("This sets which outputs are known to be spent, and thus not to be used as privacy placeholders in ring signatures. ") +
qsTr("You should only have to load a file when you want to refresh the list. Manual adding/removing is possible if needed.") + translationManager.emptyString qsTr("You should only have to load a file when you want to refresh the list. Manual adding/removing is possible if needed.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true; Layout.fillWidth: true;
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
ColumnLayout { ColumnLayout {
@ -155,35 +153,31 @@ Rectangle {
id: loadBlackballFileDialog id: loadBlackballFileDialog
title: qsTr("Please choose a file from which to load outputs to mark as spent") + translationManager.emptyString; title: qsTr("Please choose a file from which to load outputs to mark as spent") + translationManager.emptyString;
folder: "file://" folder: "file://"
nameFilters: [ "*"] nameFilters: ["*"]
onAccepted: { onAccepted: {
loadBlackballFileLine.text = walletManager.urlToLocalPath(loadBlackballFileDialog.fileUrl) loadBlackballFileLine.text = walletManager.urlToLocalPath(loadBlackballFileDialog.fileUrl)
} }
} }
RowLayout { MoneroComponents.LineEdit {
id: loadBlackballFileLine
Layout.fillWidth: true Layout.fillWidth: true
fontSize: 16 * scaleRatio
LineEdit { placeholderFontSize: 16 * scaleRatio
id: loadBlackballFileLine placeholderText: qsTr("Path to file") + "..." + translationManager.emptyString
Layout.fillWidth: true labelFontSize: 14 * scaleRatio
fontSize: mainLayout.lineEditFontSize labelText: qsTr("Filename with outputs to mark as spent") + ":" + translationManager.emptyString
placeholderText: qsTr("Path to file") + "..." + translationManager.emptyString copyButton: true
labelFontSize: 14 * scaleRatio readOnly: false
labelText: qsTr("Filename with outputs to mark as spent") + ":" + translationManager.emptyString
copyButton: true
readOnly: false
}
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 18 Layout.topMargin: 18
StandardButton { MoneroComponents.StandardButton {
id: selectBlackballFileButton id: selectBlackballFileButton
anchors.rightMargin: 17 * scaleRatio
text: qsTr("Browse") + translationManager.emptyString text: qsTr("Browse") + translationManager.emptyString
enabled: true enabled: true
small: true small: true
@ -192,7 +186,7 @@ Rectangle {
} }
} }
StandardButton { MoneroComponents.StandardButton {
id: loadBlackballFileButton id: loadBlackballFileButton
text: qsTr("Load") + translationManager.emptyString text: qsTr("Load") + translationManager.emptyString
small: true small: true
@ -202,55 +196,57 @@ Rectangle {
} }
} }
ColumnLayout { GridLayout {
Layout.topMargin: 12 Layout.fillWidth: true
columnSpacing: 20 * scaleRatio
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: blackballOutputAmountLine
id: blackballOutputAmountLine Layout.fillWidth: true
fontSize: mainLayout.lineEditFontSize fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio labelFontSize: 14 * scaleRatio
labelText: qsTr("Or manually mark a single output as spent/unspent:") + translationManager.emptyString labelText: qsTr("Or manually mark a single output as spent/unspent:") + translationManager.emptyString
placeholderText: qsTr("Paste output amount") + "..." + translationManager.emptyString placeholderFontSize: 16 * scaleRatio
readOnly: false placeholderText: qsTr("Paste output amount") + "..." + translationManager.emptyString
width: mainLayout.editWidth / 2 readOnly: false
validator: IntValidator { bottom: 0 } validator: IntValidator { bottom: 0 }
}
LineEdit {
id: blackballOutputOffsetLine
fontSize: mainLayout.lineEditFontSize
labelFontSize: 14 * scaleRatio
labelText: " "
placeholderText: qsTr("Paste output offset") + "..." + translationManager.emptyString
readOnly: false
width: mainLayout.editWidth / 2
validator: IntValidator { bottom: 0 }
}
} }
RowLayout { MoneroComponents.LineEdit {
id: blackballOutputOffsetLine
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 18 fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio
StandardButton { labelText: " "
id: blackballButton placeholderFontSize: 16 * scaleRatio
text: qsTr("Mark as spent") + translationManager.emptyString placeholderText: qsTr("Paste output offset") + "..." + translationManager.emptyString
small: true readOnly: false
enabled: !!appWindow.currentWallet && validUnsigned(blackballOutputAmountLine.text) && validUnsigned(blackballOutputOffsetLine.text) validator: IntValidator { bottom: 0 }
onClicked: appWindow.currentWallet.blackballOutput(blackballOutputAmountLine.text, blackballOutputOffsetLine.text)
}
StandardButton {
id: unblackballButton
text: qsTr("Mark as unspent") + translationManager.emptyString
small: true
enabled: !!appWindow.currentWallet && validUnsigned(blackballOutputAmountLine.text) && validUnsigned(blackballOutputOffsetLine.text)
onClicked: appWindow.currentWallet.unblackballOutput(blackballOutputAmountLine.text, blackballOutputOffsetLine.text)
}
} }
} }
LabelSubheader { RowLayout {
Layout.fillWidth: true
Layout.topMargin: 18
MoneroComponents.StandardButton {
id: blackballButton
text: qsTr("Mark as spent") + translationManager.emptyString
small: true
enabled: !!appWindow.currentWallet && validUnsigned(blackballOutputAmountLine.text) && validUnsigned(blackballOutputOffsetLine.text)
onClicked: appWindow.currentWallet.blackballOutput(blackballOutputAmountLine.text, blackballOutputOffsetLine.text)
}
MoneroComponents.StandardButton {
id: unblackballButton
text: qsTr("Mark as unspent") + translationManager.emptyString
small: true
enabled: !!appWindow.currentWallet && validUnsigned(blackballOutputAmountLine.text) && validUnsigned(blackballOutputOffsetLine.text)
onClicked: appWindow.currentWallet.unblackballOutput(blackballOutputAmountLine.text, blackballOutputOffsetLine.text)
}
}
MoneroComponents.LabelSubheader {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24 * scaleRatio Layout.topMargin: 24 * scaleRatio
textFormat: Text.RichText textFormat: Text.RichText
@ -278,26 +274,24 @@ Rectangle {
Text { Text {
textFormat: Text.RichText textFormat: Text.RichText
font.family: Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
text: qsTr("This records rings used by outputs spent on Monero on a key reusing chain, so that the same ring may be reused to avoid privacy issues.") + translationManager.emptyString text: qsTr("This records rings used by outputs spent on Monero on a key reusing chain, so that the same ring may be reused to avoid privacy issues.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true; Layout.fillWidth: true;
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: keyImageLine
id: keyImageLine Layout.fillWidth: true
fontSize: mainLayout.lineEditFontSize fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio labelFontSize: 14 * scaleRatio
labelText: qsTr("Key image") + ":" + translationManager.emptyString labelText: qsTr("Key image") + ":" + translationManager.emptyString
placeholderText: qsTr("Paste key image") + "..." + translationManager.emptyString placeholderFontSize: 16 * scaleRatio
readOnly: false placeholderText: qsTr("Paste key image") + "..." + translationManager.emptyString
copyButton: true readOnly: false
width: mainLayout.editWidth copyButton: true
Layout.fillWidth: true
}
} }
GridLayout{ GridLayout{
@ -307,10 +301,10 @@ Rectangle {
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
LineEdit { MoneroComponents.LineEdit {
id: getRingLine id: getRingLine
Layout.fillWidth: true Layout.fillWidth: true
fontSize: mainLayout.lineEditFontSize fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio labelFontSize: 14 * scaleRatio
labelText: qsTr("Get ring") + ":" + translationManager.emptyString labelText: qsTr("Get ring") + ":" + translationManager.emptyString
readOnly: true readOnly: true
@ -322,7 +316,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 18 Layout.topMargin: 18
StandardButton { MoneroComponents.StandardButton {
id: getRingButton id: getRingButton
text: qsTr("Get Ring") + translationManager.emptyString text: qsTr("Get Ring") + translationManager.emptyString
small: true small: true
@ -342,11 +336,12 @@ Rectangle {
ColumnLayout { ColumnLayout {
RowLayout { RowLayout {
LineEdit { MoneroComponents.LineEdit {
id: setRingLine id: setRingLine
Layout.fillWidth: true Layout.fillWidth: true
fontSize: mainLayout.lineEditFontSize fontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio labelFontSize: 14 * scaleRatio
placeholderFontSize: 16 * scaleRatio
labelText: qsTr("Set ring") + ":" + translationManager.emptyString labelText: qsTr("Set ring") + ":" + translationManager.emptyString
readOnly: false readOnly: false
copyButton: true copyButton: true
@ -357,7 +352,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 18 Layout.topMargin: 18
StandardButton { MoneroComponents.StandardButton {
id: setRingButton id: setRingButton
text: qsTr("Set Ring") + translationManager.emptyString text: qsTr("Set Ring") + translationManager.emptyString
small: true small: true
@ -372,9 +367,10 @@ Rectangle {
} }
GridLayout { GridLayout {
columnSpacing: 20 * scaleRatio
columns: (isMobile) ? 1 : 2 columns: (isMobile) ? 1 : 2
CheckBox { MoneroComponents.CheckBox {
id: segregatePreForkOutputs id: segregatePreForkOutputs
checked: persistentSettings.segregatePreForkOutputs checked: persistentSettings.segregatePreForkOutputs
text: qsTr("I intend to spend on key-reusing fork(s)") + translationManager.emptyString text: qsTr("I intend to spend on key-reusing fork(s)") + translationManager.emptyString
@ -388,7 +384,7 @@ Rectangle {
} }
} }
CheckBox { MoneroComponents.CheckBox {
id: keyReuseMitigation2 id: keyReuseMitigation2
checked: persistentSettings.keyReuseMitigation2 checked: persistentSettings.keyReuseMitigation2
text: qsTr("I might want to spend on key-reusing fork(s)") + translationManager.emptyString text: qsTr("I might want to spend on key-reusing fork(s)") + translationManager.emptyString
@ -402,7 +398,7 @@ Rectangle {
} }
} }
CheckBox { MoneroComponents.CheckBox {
id: setRingRelative id: setRingRelative
checked: true checked: true
text: qsTr("Relative") + translationManager.emptyString text: qsTr("Relative") + translationManager.emptyString
@ -416,13 +412,15 @@ Rectangle {
Layout.topMargin: 17 * scaleRatio Layout.topMargin: 17 * scaleRatio
Layout.fillWidth: true Layout.fillWidth: true
LineEdit { MoneroComponents.LineEdit {
id: segregationHeightLine id: segregationHeightLine
readOnly: false Layout.fillWidth: true
placeholderFontSize: 16 * scaleRatio
labelFontSize: 14 * scaleRatio labelFontSize: 14 * scaleRatio
labelText: qsTr("Segregation height:") + translationManager.emptyString labelText: qsTr("Segregation height:") + translationManager.emptyString
Layout.fillWidth: true
validator: IntValidator { bottom: 0 } validator: IntValidator { bottom: 0 }
readOnly: false
onEditingFinished: { onEditingFinished: {
persistentSettings.segregationHeight = segregationHeightLine.text persistentSettings.segregationHeight = segregationHeightLine.text
if (appWindow.currentWallet) { if (appWindow.currentWallet) {

View file

@ -37,7 +37,6 @@ import moneroComponents.WalletManager 1.0
import "../components" as MoneroComponents import "../components" as MoneroComponents
Rectangle { Rectangle {
id: mainLayout
property bool messageMode: true property bool messageMode: true
property bool fileMode: false property bool fileMode: false
@ -86,48 +85,29 @@ Rectangle {
// sign / verify // sign / verify
ColumnLayout { ColumnLayout {
anchors.top: parent.top id: mainLayout
Layout.fillWidth: true
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
anchors.topMargin: 40 * scaleRatio anchors.topMargin: 40 * scaleRatio
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
Rectangle { spacing: 20 * scaleRatio
id: instructionsRect
Layout.preferredHeight: (instructionsText.height + 26) * scaleRatio MoneroComponents.Label {
fontSize: 24 * scaleRatio
text: qsTr("Sign/verify") + translationManager.emptyString
}
Text {
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
radius: 2 * scaleRatio font.family: MoneroComponents.Style.fontRegular.name
border.color: Qt.rgba(255, 255, 255, 0.25) font.pixelSize: 14 * scaleRatio
border.width: 1 * scaleRatio color: MoneroComponents.Style.defaultFontColor
color: "transparent"
RowLayout {
Layout.fillWidth: true
Layout.preferredHeight: (instructionsText.height + 40) * scaleRatio
Image {
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: 22 * scaleRatio
Layout.preferredWidth: 22 * scaleRatio
Layout.leftMargin: 10 * scaleRatio
Layout.topMargin: 10 * scaleRatio
source: "../images/editIcon.png"
}
Text {
id: instructionsText
Layout.topMargin: 12 * scaleRatio
Layout.preferredWidth: (instructionsRect.width - 80) * scaleRatio
Layout.leftMargin: 6 * scaleRatio
text: qsTr("This page lets you sign/verify a message (or file contents) with your address.") + translationManager.emptyString
wrapMode: Text.Wrap
Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 15 * scaleRatio
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
}
}
} }
ColumnLayout { ColumnLayout {
@ -173,23 +153,15 @@ Rectangle {
} }
} }
Rectangle {
// divider
Layout.preferredHeight: 1 * scaleRatio
Layout.fillWidth: true
Layout.topMargin: 8 * scaleRatio
Layout.bottomMargin: 8 * scaleRatio
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
ColumnLayout { ColumnLayout {
id: signSection id: signSection
spacing: 10 * scaleRatio spacing: 10 * scaleRatio
MoneroComponents.Label { MoneroComponents.LabelSubheader {
id: signTitleLabel Layout.fillWidth: true
fontSize: 20 * scaleRatio Layout.topMargin: 12 * scaleRatio
Layout.bottomMargin: 24 * scaleRatio
textFormat: Text.RichText
text: fileMode ? qsTr("Sign file") + translationManager.emptyString : qsTr("Sign message") + translationManager.emptyString text: fileMode ? qsTr("Sign file") + translationManager.emptyString : qsTr("Sign message") + translationManager.emptyString
} }
@ -202,8 +174,10 @@ Rectangle {
MoneroComponents.LineEditMulti{ MoneroComponents.LineEditMulti{
id: signMessageLine id: signMessageLine
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: qsTr("Enter a message to sign") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString; labelText: qsTr("Message") + translationManager.emptyString;
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter a message to sign") + translationManager.emptyString;
readOnly: false readOnly: false
onTextChanged: signSignatureLine.text = '' onTextChanged: signSignatureLine.text = ''
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
@ -218,7 +192,9 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: signFileLine id: signFileLine
labelFontSize: 14 * scaleRatio
labelText: qsTr("File") + translationManager.emptyString labelText: qsTr("File") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter path to file") + translationManager.emptyString; placeholderText: qsTr("Enter path to file") + translationManager.emptyString;
readOnly: false readOnly: false
Layout.fillWidth: true Layout.fillWidth: true
@ -244,7 +220,9 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: signSignatureLine id: signSignatureLine
labelText: qsTr("Signature") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
labelText: qsTr("Signature") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: messageMode ? qsTr("Click [Sign Message] to generate signature") + translationManager.emptyString : qsTr("Click [Sign File] to generate signature") + translationManager.emptyString; placeholderText: messageMode ? qsTr("Click [Sign Message] to generate signature") + translationManager.emptyString : qsTr("Click [Sign File] to generate signature") + translationManager.emptyString;
readOnly: true readOnly: true
Layout.fillWidth: true Layout.fillWidth: true
@ -296,23 +274,14 @@ Rectangle {
} }
} }
Rectangle {
// divider
Layout.preferredHeight: 1 * scaleRatio
Layout.fillWidth: true
Layout.topMargin: 8 * scaleRatio
Layout.bottomMargin: 8 * scaleRatio
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
ColumnLayout { ColumnLayout {
id: verifySection id: verifySection
spacing: 16 * scaleRatio spacing: 16 * scaleRatio
MoneroComponents.Label { MoneroComponents.LabelSubheader {
id: verifyTitleLabel Layout.fillWidth: true
fontSize: 20 * scaleRatio Layout.bottomMargin: 24 * scaleRatio
textFormat: Text.RichText
text: fileMode ? qsTr("Verify file") + translationManager.emptyString : qsTr("Verify message") + translationManager.emptyString text: fileMode ? qsTr("Verify file") + translationManager.emptyString : qsTr("Verify message") + translationManager.emptyString
} }
@ -320,8 +289,10 @@ Rectangle {
id: verifyMessageLine id: verifyMessageLine
visible: messageMode visible: messageMode
Layout.fillWidth: true Layout.fillWidth: true
labelText: qsTr("Message") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Enter the message to verify") + translationManager.emptyString; labelText: qsTr("Message") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter the message to verify") + translationManager.emptyString
readOnly: false readOnly: false
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
text: '' text: ''
@ -335,8 +306,10 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: verifyFileLine id: verifyFileLine
labelText: qsTr("File") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Enter path to file") + translationManager.emptyString; labelText: qsTr("File") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter path to file") + translationManager.emptyString
readOnly: false readOnly: false
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
@ -358,9 +331,11 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: verifyAddressLine id: verifyAddressLine
Layout.fillWidth: true Layout.fillWidth: true
labelText: qsTr("Address") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
labelText: qsTr("Address") + translationManager.emptyString
addressValidation: true addressValidation: true
placeholderText: qsTr("Enter the Monero Address (example: 44AFFq5kSiGBoZ...)") + translationManager.emptyString; placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter the Monero Address (example: 44AFFq5kSiGBoZ...)") + translationManager.emptyString
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
text: '' text: ''
pasteButton: true pasteButton: true
@ -368,8 +343,10 @@ Rectangle {
MoneroComponents.LineEditMulti { MoneroComponents.LineEditMulti {
id: verifySignatureLine id: verifySignatureLine
labelText: qsTr("Signature") + translationManager.emptyString; labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Enter the signature to verify") + translationManager.emptyString; labelText: qsTr("Signature") + translationManager.emptyString
placeholderFontSize: 16 * scaleRatio
placeholderText: qsTr("Enter the signature to verify") + translationManager.emptyString
Layout.fillWidth: true Layout.fillWidth: true
pasteButton: true pasteButton: true
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere

View file

@ -31,7 +31,7 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import "../components" import "../components" as MoneroComponents
import moneroComponents.Clipboard 1.0 import moneroComponents.Clipboard 1.0
import "../js/TxUtils.js" as TxUtils import "../js/TxUtils.js" as TxUtils
@ -57,62 +57,60 @@ Rectangle {
id: soloBox id: soloBox
spacing: 20 * scaleRatio spacing: 20 * scaleRatio
Label { MoneroComponents.Label {
id: soloTitleLabel id: soloTitleLabel
fontSize: 24 * scaleRatio fontSize: 24 * scaleRatio
text: qsTr("Prove Transaction") + translationManager.emptyString text: qsTr("Prove Transaction") + translationManager.emptyString
} }
Text { Text {
Layout.fillWidth: true
text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" + text: qsTr("Generate a proof of your incoming/outgoing payment by supplying the transaction ID, the recipient address and an optional message. \n" +
"For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString "For the case of outgoing payments, you can get a 'Spend Proof' that proves the authorship of a transaction. In this case, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true font.family: MoneroComponents.Style.fontRegular.name
font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: getProofTxIdLine
labelText: qsTr("Transaction ID") + translationManager.emptyString Layout.fillWidth: true
id: getProofTxIdLine labelFontSize: 14 * scaleRatio
fontSize: 16 * scaleRatio labelText: qsTr("Transaction ID") + translationManager.emptyString
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString fontSize: 16 * scaleRatio
readOnly: false placeholderFontSize: 16 * scaleRatio
Layout.fillWidth: true placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
copyButton: true readOnly: false
} copyButton: true
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: getProofAddressLine
id: getProofAddressLine Layout.fillWidth: true
labelText: qsTr("Address") + translationManager.emptyString labelFontSize: 14 * scaleRatio
fontSize: 16 * scaleRatio labelText: qsTr("Address") + translationManager.emptyString
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString; fontSize: 16 * scaleRatio
readOnly: false placeholderFontSize: 16 * scaleRatio
Layout.fillWidth: true placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
copyButton: true readOnly: false
} copyButton: true
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: getProofMessageLine
id: getProofMessageLine Layout.fillWidth: true
fontSize: 16 * scaleRatio fontSize: 16 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString; labelText: qsTr("Message") + translationManager.emptyString
readOnly: false placeholderFontSize: 16 * scaleRatio
width: mainLayout.editWidth placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
Layout.fillWidth: true readOnly: false
copyButton: true copyButton: true
}
} }
StandardButton { MoneroComponents.StandardButton {
Layout.topMargin: 17 * scaleRatio Layout.topMargin: 16 * scaleRatio
width: 60 * scaleRatio
small: true small: true
text: qsTr("Generate") + translationManager.emptyString text: qsTr("Generate") + translationManager.emptyString
enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype)) enabled: TxUtils.checkTxID(getProofTxIdLine.text) && (getProofAddressLine.text.length == 0 || TxUtils.checkAddress(getProofAddressLine.text, appWindow.persistentSettings.nettype))
@ -131,7 +129,7 @@ Rectangle {
anchors.bottomMargin: 3 * scaleRatio anchors.bottomMargin: 3 * scaleRatio
} }
Label { MoneroComponents.Label {
id: soloTitleLabel2 id: soloTitleLabel2
fontSize: 24 * scaleRatio fontSize: 24 * scaleRatio
text: qsTr("Check Transaction") + translationManager.emptyString text: qsTr("Check Transaction") + translationManager.emptyString
@ -142,66 +140,61 @@ Rectangle {
"For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString "For the case with Spend Proof, you don't need to specify the recipient address.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: checkProofTxIdLine
id: checkProofTxIdLine Layout.fillWidth: true
labelText: qsTr("Transaction ID") + translationManager.emptyString labelFontSize: 14 * scaleRatio
fontSize: 16 * scaleRatio labelText: qsTr("Transaction ID") + translationManager.emptyString
placeholderText: qsTr("Paste tx ID") + translationManager.emptyString fontSize: 16 * scaleRatio
readOnly: false placeholderFontSize: 16 * scaleRatio
width: mainLayout.editWidth placeholderText: qsTr("Paste tx ID") + translationManager.emptyString
Layout.fillWidth: true readOnly: false
copyButton: true copyButton: true
}
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: checkProofAddressLine
id: checkProofAddressLine Layout.fillWidth: true
labelText: qsTr("Address") + translationManager.emptyString labelFontSize: 14 * scaleRatio
fontSize: 16 * scaleRatio labelText: qsTr("Address") + translationManager.emptyString
placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString; fontSize: 16 * scaleRatio
readOnly: false placeholderFontSize: 16 * scaleRatio
width: mainLayout.editWidth placeholderText: qsTr("Recipient's wallet address") + translationManager.emptyString;
Layout.fillWidth: true readOnly: false
copyButton: true copyButton: true
}
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: checkProofMessageLine
id: checkProofMessageLine Layout.fillWidth: true
fontSize: 16 * scaleRatio fontSize: 16 * scaleRatio
labelText: qsTr("Message") + translationManager.emptyString labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString; labelText: qsTr("Message") + translationManager.emptyString
readOnly: false placeholderFontSize: 16 * scaleRatio
width: mainLayout.editWidth placeholderText: qsTr("Optional message against which the signature is signed") + translationManager.emptyString;
Layout.fillWidth: true readOnly: false
copyButton: true copyButton: true
}
} }
RowLayout { MoneroComponents.LineEdit {
LineEdit { id: checkProofSignatureLine
id: checkProofSignatureLine Layout.fillWidth: true
fontSize: 16 * scaleRatio fontSize: 16 * scaleRatio
labelText: qsTr("Signature") + translationManager.emptyString labelFontSize: 14 * scaleRatio
placeholderText: qsTr("Paste tx proof") + translationManager.emptyString; labelText: qsTr("Signature") + translationManager.emptyString
readOnly: false placeholderFontSize: 16 * scaleRatio
width: mainLayout.editWidth placeholderText: qsTr("Paste tx proof") + translationManager.emptyString;
Layout.fillWidth: true readOnly: false
copyButton: true copyButton: true
}
} }
StandardButton { MoneroComponents.StandardButton {
Layout.topMargin: 17 * scaleRatio Layout.topMargin: 16 * scaleRatio
width: 60
small: true small: true
text: qsTr("Check") + translationManager.emptyString 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.nettype))) 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.nettype)))
@ -225,9 +218,9 @@ Rectangle {
text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString text: qsTr("If a payment had several transactions then each must be checked and the results combined.") + translationManager.emptyString
wrapMode: Text.Wrap wrapMode: Text.Wrap
Layout.fillWidth: true Layout.fillWidth: true
font.family: Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio font.pixelSize: 14 * scaleRatio
color: Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
} }
} }
} }