aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-03-19 02:42:46 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:03 +0100
commit57a9508849f36c7cda513df98e478babbc3e6cb3 (patch)
tree53ff925c28f13593fb065bad24c5801e454a1bb6 /components
parent49770494251a318da37849f1c628f25edaf94483 (diff)
downloadmonzero-gui-57a9508849f36c7cda513df98e478babbc3e6cb3.tar.gz
monzero-gui-57a9508849f36c7cda513df98e478babbc3e6cb3.tar.xz
monzero-gui-57a9508849f36c7cda513df98e478babbc3e6cb3.zip
Receive page; modified subaddress table
Diffstat (limited to 'components')
-rw-r--r--components/InputDialog.qml8
-rw-r--r--components/InputMulti.qml6
-rw-r--r--components/LineEdit.qml2
-rw-r--r--components/LineEditMulti.qml12
-rw-r--r--components/SubaddressTable.qml87
5 files changed, 83 insertions, 32 deletions
diff --git a/components/InputDialog.qml b/components/InputDialog.qml
index 8ab5b5d8..2990c5c9 100644
--- a/components/InputDialog.qml
+++ b/components/InputDialog.qml
@@ -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: {
diff --git a/components/InputMulti.qml b/components/InputMulti.qml
index 2df797e2..f809ca10 100644
--- a/components/InputMulti.qml
+++ b/components/InputMulti.qml
@@ -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;
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index f488790d..f5e8a478 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -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 {
diff --git a/components/LineEditMulti.qml b/components/LineEditMulti.qml
index 43d67602..02f281f3 100644
--- a/components/LineEditMulti.qml
+++ b/components/LineEditMulti.qml
@@ -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
}
}
}
diff --git a/components/SubaddressTable.qml b/components/SubaddressTable.qml
index 8d6b8d1d..a52ed1fe 100644
--- a/components/SubaddressTable.qml
+++ b/components/SubaddressTable.qml
@@ -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
+
+ 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);
- }
+ 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;
+ }
}
- }
- highlight: Rectangle {
- height: 64
- color: '#FF4304'
- opacity: 0.2
- z: 2
+ 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
+ }
}
}