mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-07 17:27:25 -04:00
Enable clipboard copy functionality on XMR amounts
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user