diff options
| author | xiphon <xiphon@protonmail.com> | 2019-01-15 16:48:22 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2019-01-15 20:24:18 +0000 |
| commit | b758c799d4ca7eeee277e91ec134b58da1b58b74 (patch) | |
| tree | bba7f76cf6095efc751482d1ae5837a2c9cc75ae /pages | |
| parent | 36eb1f80e1c070f753746519e2c9e4f01784f6c2 (diff) | |
| download | monzero-gui-b758c799d4ca7eeee277e91ec134b58da1b58b74.tar.gz monzero-gui-b758c799d4ca7eeee277e91ec134b58da1b58b74.tar.xz monzero-gui-b758c799d4ca7eeee277e91ec134b58da1b58b74.zip | |
AddressBook: hide 'Add' form when invoked from 'Send' tab
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/AddressBook.qml | 30 | ||||
| -rw-r--r-- | pages/Transfer.qml | 5 |
2 files changed, 20 insertions, 15 deletions
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index 36de37d5..099c05e7 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -32,18 +32,17 @@ import "../components" import moneroComponents.AddressBook 1.0 import moneroComponents.AddressBookModel 1.0 -Rectangle { +ColumnLayout { id: root - color: "transparent" property var model + property bool selectAndSend: false ColumnLayout { - id: columnLayout - anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio - anchors.left: parent.left - anchors.top: parent.top - anchors.right: parent.right + Layout.margins: (isMobile ? 17 : 20) * scaleRatio + Layout.topMargin: 40 * scaleRatio + Layout.fillWidth: true spacing: 26 * scaleRatio + visible: !root.selectAndSend RowLayout { StandardButton { @@ -118,13 +117,11 @@ Rectangle { Rectangle { id: tableRect - anchors.top: columnLayout.bottom - anchors.leftMargin: (isMobile)? 17 : 40 - anchors.rightMargin: (isMobile)? 17 : 40 - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: parent.height - addButton.y - addButton.height - 36 * scaleRatio + Layout.leftMargin: (isMobile ? 17 : 40) * scaleRatio + Layout.rightMargin: (isMobile ? 17 : 40) * scaleRatio + Layout.topMargin: (root.selectAndSend ? 40 : 0) * scaleRatio + Layout.fillHeight: true + Layout.fillWidth: true color: "transparent" Behavior on height { @@ -148,6 +145,7 @@ Rectangle { anchors.bottom: parent.bottom onContentYChanged: flickableScroll.flickableContentYChanged() model: root.model + selectAndSend: root.selectAndSend } } @@ -167,6 +165,10 @@ Rectangle { return address_ok && payment_id_ok } + function onPageClosed() { + root.selectAndSend = false; + } + function onPageCompleted() { console.log("adress book"); root.model = currentWallet.addressBookModel; diff --git a/pages/Transfer.qml b/pages/Transfer.qml index adad5fd2..a93fff1b 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -213,7 +213,10 @@ Rectangle { placeholderText: "4.. / 8.." wrapMode: Text.WrapAnywhere addressValidation: true - onInputLabelLinkActivated: { appWindow.showPageRequest("AddressBook") } + onInputLabelLinkActivated: { + middlePanel.addressBookView.selectAndSend = true; + appWindow.showPageRequest("AddressBook"); + } pasteButton: true onPaste: function(clipboardText) { const parsed = walletManager.parse_uri_to_object(clipboardText); |
