diff options
| author | mmbyday <bromark@protonmail.com> | 2018-12-03 17:54:44 -0500 |
|---|---|---|
| committer | mmbyday <bromark@protonmail.com> | 2018-12-04 13:29:50 -0500 |
| commit | 4bfd8560cd5408c60a16f8977c75a59620f686a3 (patch) | |
| tree | 0ed87b00e9f26c3ed70bcbaef923d1f459d396fc /components/HistoryTable.qml | |
| parent | 9f6b4334a19f3172a28b718da31222ded1f28254 (diff) | |
| download | monzero-gui-4bfd8560cd5408c60a16f8977c75a59620f686a3.tar.gz monzero-gui-4bfd8560cd5408c60a16f8977c75a59620f686a3.tar.xz monzero-gui-4bfd8560cd5408c60a16f8977c75a59620f686a3.zip | |
Enable clipboard copy functionality on XMR amounts
Diffstat (limited to 'components/HistoryTable.qml')
| -rw-r--r-- | components/HistoryTable.qml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index 0077c4d2..79203fbe 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -175,7 +175,23 @@ ListView { return _amount + " XMR"; } - color: isOut ? "white" : "#2eb358" + color: isOut ? MoneroComponents.Style.white : MoneroComponents.Style.green + + MouseArea { + hoverEnabled: true + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onEntered: { + parent.color = MoneroComponents.Style.orange + } + onExited: { + parent.color = isOut ? MoneroComponents.Style.white : MoneroComponents.Style.green } + onClicked: { + console.log("Copied to clipboard"); + clipboard.setText(parent.text.split(" ")[0]); + appWindow.showStatusMessage(qsTr("Copied to clipboard"),3) + } + } } Rectangle { |
