2016-02-06 13:49:31 +01:00
|
|
|
import QtQuick 2.0
|
2016-10-02 20:40:40 +02:00
|
|
|
import moneroComponents.Clipboard 1.0
|
2016-02-06 13:49:31 +01:00
|
|
|
|
|
|
|
Column {
|
|
|
|
|
|
|
|
property alias memoText : memoTextInput.text
|
|
|
|
property alias tipText: wordsTipText.text
|
|
|
|
property alias tipTextVisible: tipRect.visible
|
|
|
|
property alias memoTextReadOnly : memoTextInput.readOnly
|
|
|
|
property alias clipboardButtonVisible: clipboardButton.visible
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: memoTextRect
|
|
|
|
width: parent.width
|
|
|
|
height: {
|
|
|
|
memoTextInput.height
|
|
|
|
// to have less gap between button and text input we reduce overall height by button height
|
|
|
|
//+ (clipboardButton.visible ? clipboardButton.height : 0)
|
|
|
|
+ (tipRect.visible ? tipRect.height : 0)
|
|
|
|
}
|
|
|
|
border.width: 1
|
|
|
|
border.color: "#DBDBDB"
|
|
|
|
|
|
|
|
TextEdit {
|
|
|
|
id: memoTextInput
|
2017-01-26 21:54:31 +01:00
|
|
|
property alias placeholderText: memoTextPlaceholder.text
|
2016-02-06 13:49:31 +01:00
|
|
|
textMargin: 8
|
2016-02-23 16:59:26 +01:00
|
|
|
text: ""
|
2016-02-06 13:49:31 +01:00
|
|
|
font.family: "Arial"
|
2017-01-26 21:54:31 +01:00
|
|
|
font.pixelSize: 16
|
2016-02-06 13:49:31 +01:00
|
|
|
wrapMode: TextInput.Wrap
|
|
|
|
width: parent.width
|
|
|
|
selectByMouse: true
|
|
|
|
property int minimumHeight: 100
|
|
|
|
height: contentHeight > minimumHeight ? contentHeight : minimumHeight
|
2017-01-26 21:54:31 +01:00
|
|
|
|
|
|
|
Text {
|
|
|
|
id: memoTextPlaceholder
|
|
|
|
anchors.fill:parent
|
|
|
|
font.pixelSize: 16
|
|
|
|
anchors.margins: 8
|
|
|
|
font.bold:true
|
|
|
|
text: qsTr("Enter your 25 word mnemonic seed")
|
|
|
|
color: "#BABABA"
|
|
|
|
visible: !memoTextInput.text/* && !parent.focus*/
|
|
|
|
}
|
2016-02-06 13:49:31 +01:00
|
|
|
}
|
|
|
|
Image {
|
|
|
|
id : clipboardButton
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: tipRect.top
|
|
|
|
source: "qrc:///images/greyTriangle.png"
|
|
|
|
Image {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
source: "qrc:///images/copyToClipboard.png"
|
|
|
|
}
|
|
|
|
Clipboard { id: clipboard }
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: clipboard.setText(memoTextInput.text)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
id: tipRect
|
|
|
|
visible: true
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: memoTextRect.bottom
|
|
|
|
height: wordsTipText.contentHeight + wordsTipText.anchors.topMargin
|
|
|
|
color: "#DBDBDB"
|
|
|
|
property alias text: wordsTipText.text
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: wordsTipText
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin : 16
|
|
|
|
anchors.bottomMargin: 16
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.family: "Arial"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: "#4A4646"
|
|
|
|
wrapMode: Text.Wrap
|
2016-12-28 00:02:31 +01:00
|
|
|
text: qsTr("This seed is <b>very</b> important to write down and keep secret. It is all you need to backup and restore your wallet.")
|
2016-07-20 21:28:11 +02:00
|
|
|
+ translationManager.emptyString
|
2016-02-06 13:49:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|