Receive page; modified subaddress table

This commit is contained in:
Sander Ferdinand
2018-03-19 02:42:46 +01:00
committed by moneromooo-monero
parent 4977049425
commit 57a9508849
7 changed files with 171 additions and 182 deletions

View File

@@ -150,10 +150,6 @@ Item {
id: cancelButton
width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: input
onClicked: {
@@ -165,10 +161,6 @@ Item {
id: okButton
width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Ok")
KeyNavigation.tab: cancelButton
onClicked: {

View File

@@ -36,13 +36,15 @@ TextArea {
property bool error: false
property bool addressValidation: false
property bool wrapAnywhere: true
property int fontSize: 18 * scaleRatio
id: textArea
font.family: Style.fontRegular.name
font.pixelSize: 18 * scaleRatio
font.family: Style.fontRegular
font.pixelSize: fontSize
font.bold: false
horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
color: Style.defaultFontColor
wrapMode: {
if(wrapAnywhere){
return Text.WrapAnywhere;

View File

@@ -131,7 +131,7 @@ Item {
id: inputItem
height: inputHeight * scaleRatio
anchors.top: showingHeader ? inputLabel.bottom : parent.top
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
width: parent.width
Text {

View File

@@ -32,6 +32,7 @@ import "." 1.0
ColumnLayout {
id: lineditmulti
property alias text: multiLine.text
property alias placeholderText: placeholderLabel.text
property alias inputLabelText: inputLabel.text
@@ -43,6 +44,10 @@ ColumnLayout {
property bool labelButtonVisible: false
property bool copyButton: false
property bool wrapAnywhere: true
property bool showingHeader: true
property bool showBorder: true
property int fontSize: 18 * scaleRatio
signal labelButtonClicked();
signal inputLabelLinkActivated();
@@ -52,6 +57,7 @@ ColumnLayout {
color: "transparent"
Layout.fillWidth: true
height: (inputLabel.height + 10) * scaleRatio
visible: showingHeader ? true : false
Text {
id: inputLabel
@@ -91,11 +97,12 @@ ColumnLayout {
id: multiLine
readOnly: false
addressValidation: true
anchors.top: inputLabelRect.bottom
anchors.top: parent.showingHeader ? inputLabelRect.bottom : parent.top
Layout.fillWidth: true
topPadding: 10 * scaleRatio
topPadding: parent.showingHeader ? 10 * scaleRatio : 0
bottomPadding: 10 * scaleRatio
wrapAnywhere: parent.wrapAnywhere
fontSize: parent.fontSize
Text {
id: placeholderLabel
@@ -125,6 +132,7 @@ ColumnLayout {
}
radius: 4
anchors.fill: parent
visible: lineditmulti.showBorder
}
}
}

View File

@@ -28,40 +28,57 @@
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
import "." 1.0
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
highlightMoveDuration: 0
highlightFollowsCurrentItem: true
anchors.topMargin: 0
spacing: 0
delegate: Rectangle {
id: delegate
height: 64
height: 74
color: 'transparent';
anchors.topMargin: 0
width: listView.width
LineEdit {
LineEditMulti {
id: addressLine
//borderDisabled: true
fontSize: 12
readOnly: true
width: parent.width
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 5
anchors.leftMargin: 5
anchors.topMargin: 12
anchors.rightMargin: 40
anchors.bottomMargin: 0
onTextChanged: cursorPosition = 0
text: address
showBorder: false
IconButton {
id: clipboardButton
imageSource: "../images/copyToClipboard.png"
onClicked: {
console.log(addressLine.text + " copied to clipboard");
clipboard.setText(addressLine.text);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
}
showingHeader: false
showBorder: false
}
IconButton {
id: clipboardButton
imageSource: "../images/copyToClipboard.png"
onClicked: {
console.log(addressLine.text + " copied to clipboard");
clipboard.setText(addressLine.text);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
}
anchors.right: parent.right
anchors.rightMargin: 0
anchors.verticalCenter: parent.verticalCenter
}
Text {
@@ -85,7 +102,7 @@ ListView {
font.family: "Arial"
font.bold: true
font.pixelSize: 12
color: "#444444"
color: Style.greyFontColor
text: label
}
@@ -96,14 +113,46 @@ ListView {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: clipboardButton.width
onClicked: listView.currentIndex = index
cursorShape: Qt.PointingHandCursor
onClicked: {
listView.currentIndex = index;
}
}
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: Style.grey
z: 6
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: Style.grey
z: 6
}
Rectangle {
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
color: Style.grey
height: 1
z: 6
}
Rectangle {
width: 3
color: 'white'
visible: listView.currentIndex == index
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
}
}
highlight: Rectangle {
height: 64
color: '#FF4304'
opacity: 0.2
z: 2
}
}