diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-12-15 17:14:55 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-12-15 17:14:55 +0200 |
| commit | 575fab90c7b0c8443a24f358fa18a61b34187dd5 (patch) | |
| tree | 21c4972e575e67864b058954afedd258a4af0d8a /components | |
| parent | 160a042165b8ff68904b847f46dba4aa95553a62 (diff) | |
| parent | 3788943d9d035fbba54c6b3dec46fbc68a89de14 (diff) | |
| download | monzero-gui-575fab90c7b0c8443a24f358fa18a61b34187dd5.tar.gz monzero-gui-575fab90c7b0c8443a24f358fa18a61b34187dd5.tar.xz monzero-gui-575fab90c7b0c8443a24f358fa18a61b34187dd5.zip | |
Merge pull request #268
3788943 Addressbook: Fix size_t build error (Jaquee)
28a220d Addressbook: New tooltip implementation (old didn't work on ubuntu) (Jaquee)
a0f35aa bring tooltip to front (Jaquee)
0e5329a Addressbook: updated references to bitmonero (Jaquee)
a344f17 AddressBook: basic functions (Jaquee)
Diffstat (limited to 'components')
| -rw-r--r-- | components/AddressBookTable.qml | 25 | ||||
| -rw-r--r-- | components/TableDropdown.qml | 26 |
2 files changed, 34 insertions, 17 deletions
diff --git a/components/AddressBookTable.qml b/components/AddressBookTable.qml index 2ad9d2ff..129b932c 100644 --- a/components/AddressBookTable.qml +++ b/components/AddressBookTable.qml @@ -77,14 +77,14 @@ ListView { } } - Text { + TextEdit { id: addressText + selectByMouse: true anchors.bottom: descriptionText.bottom anchors.left: descriptionText.right anchors.right: dropdown.left anchors.leftMargin: description.length > 0 ? 12 : 0 - anchors.rightMargin: 12 - elide: Text.ElideRight + anchors.rightMargin: 40 font.family: "Arial" font.pixelSize: 16 font.letterSpacing: -1 @@ -103,17 +103,18 @@ ListView { font.pixelSize: 12 font.letterSpacing: -1 color: "#535353" - text: qsTr("Payment ID:") + + translationManager.emptyString + text: qsTr("Payment ID:") + translationManager.emptyString } - Text { + TextEdit { + selectByMouse: true; anchors.bottom: paymentLabel.bottom anchors.left: paymentLabel.right anchors.leftMargin: 12 anchors.rightMargin: 12 anchors.right: dropdown.left - elide: Text.ElideRight + font.family: "Arial" font.pixelSize: 13 font.letterSpacing: -1 @@ -125,7 +126,7 @@ ListView { id: dropModel ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" } ListElement { name: "<b>Send to same destination</b>"; icon: "../images/dropdownSend.png" } - ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" } +// ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" } ListElement { name: "<b>Remove from history</b>"; icon: "../images/dropdownDel.png" } } @@ -146,6 +147,16 @@ ListView { onOptionClicked: { if(option === 0) clipboard.setText(address) + else if(option === 1){ + console.log("Sending to: ", address +" "+ paymentId); + middlePanel.sendTo(address, paymentId, description); + leftPanel.selectItem(middlePanel.state) + } else if(option === 2){ + console.log("Delete: ", rowId); + currentWallet.addressBookModel.deleteRow(rowId); + } + + } } diff --git a/components/TableDropdown.qml b/components/TableDropdown.qml index 2aa2d04c..c4396008 100644 --- a/components/TableDropdown.qml +++ b/components/TableDropdown.qml @@ -120,8 +120,8 @@ Item { repeat: true running: false onTriggered: { - if(((tipItem.visible && !tipItem.containsMouse) || !tipItem.visible) && !mouseArea.containsMouse) { - tipItem.visible = false + if(((appWindow.toolTip.visible && !appWindow.toolTip.containsMouse) || !appWindow.toolTip.visible) && !mouseArea.containsMouse) { + appWindow.toolTip.visible = false dropdown.expanded = false currentIndex = -1 timer.stop() @@ -148,6 +148,10 @@ Item { } } + onClicked: { + optionClicked(currentIndex) + } + onExited: timer.start() preventStealing: true z: 1 @@ -181,7 +185,6 @@ Item { height: 30 color: containsMouse ? "#F0EEEE" : "#DBDBDB" //radius: index === repeater.count - 1 ? 5 : 0 - Rectangle { anchors.left: parent.left anchors.top: parent.top @@ -207,15 +210,18 @@ Item { onContainsMouseChanged: { if(containsMouse) { - var pos = rootItem.mapFromItem(delegate, 30, -20) - tipItem.text = name - tipItem.x = pos.x + appWindow.x - if(tipItem.height > 30) - pos.y -= tipItem.height - 30 - tipItem.y = pos.y + appWindow.y - tipItem.visible = true + var pos = rootItem.mapFromItem(delegate, 30, -25) + appWindow.toolTip.text = name + appWindow.toolTip.x = pos.x - appWindow.toolTip.width +// if(appWindow.toolTip.height > 30) +// pos.y -= appWindow.toolTip.height - 30 + appWindow.toolTip.y = pos.y + appWindow.toolTip.visible = true + appWindow.toolTip.z = 3 + } } + } } } |
