aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-12-07 18:55:25 -0600
committerluigi1111 <luigi1111w@gmail.com>2018-12-07 18:55:25 -0600
commit9dcb3604d7fef65e566844631005976511a5f196 (patch)
treebb3f9fdea9ebf1a563ed8f0490eb8f208d4c07d8 /components
parent4355dab38c4560b280955ab319aaf45cd129fd4c (diff)
parent4bfd8560cd5408c60a16f8977c75a59620f686a3 (diff)
downloadmonzero-gui-9dcb3604d7fef65e566844631005976511a5f196.tar.gz
monzero-gui-9dcb3604d7fef65e566844631005976511a5f196.tar.xz
monzero-gui-9dcb3604d7fef65e566844631005976511a5f196.zip
Merge pull request #1774
4bfd856 Enable clipboard copy functionality on XMR amounts (mmbyday)
Diffstat (limited to 'components')
-rw-r--r--components/HistoryTable.qml18
-rw-r--r--components/Style.qml3
2 files changed, 20 insertions, 1 deletions
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml
index f4ccd914..d7eb6046 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 {
diff --git a/components/Style.qml b/components/Style.qml
index f57dcfe4..9c6fded4 100644
--- a/components/Style.qml
+++ b/components/Style.qml
@@ -9,6 +9,9 @@ QtObject {
property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/Roboto-Regular.ttf"; }
property string grey: "#404040"
+ property string orange: "#FF6C3C"
+ property string white: "#FFFFFF"
+ property string green: "#2EB358"
property string defaultFontColor: "white"
property string dimmedFontColor: "#BBBBBB"