aboutsummaryrefslogtreecommitdiff
path: root/LeftPanel.qml
diff options
context:
space:
mode:
authordsc <xmrdsc@protonmail.com>2019-05-01 04:05:16 +0200
committerxmrdsc <xmrdsc@protonmail.com>2019-05-06 04:36:23 +0200
commitd4be7634cbc80cd40c2ff8456bcd962b21b2dcb6 (patch)
tree7fe6aa54f2935adc94d829c875b2300db272810c /LeftPanel.qml
parent3c1fe1da8b83738cb76a1a1242514bbe4ba515e6 (diff)
downloadmonzero-gui-d4be7634cbc80cd40c2ff8456bcd962b21b2dcb6.tar.gz
monzero-gui-d4be7634cbc80cd40c2ff8456bcd962b21b2dcb6.tar.xz
monzero-gui-d4be7634cbc80cd40c2ff8456bcd962b21b2dcb6.zip
Fiat API
Co-Authored-By: selsta <selsta@sent.at> Co-Authored-By: Gene Peters <gene@telligent-data.com>
Diffstat (limited to 'LeftPanel.qml')
-rw-r--r--LeftPanel.qml88
1 files changed, 86 insertions, 2 deletions
diff --git a/LeftPanel.qml b/LeftPanel.qml
index 8c6ce0cf..82d5b76d 100644
--- a/LeftPanel.qml
+++ b/LeftPanel.qml
@@ -32,6 +32,7 @@ import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0
import moneroComponents.Clipboard 1.0
+import FontAwesome 1.0
import "components" as MoneroComponents
import "components/effects/" as MoneroEffects
@@ -44,10 +45,13 @@ Rectangle {
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
property alias balanceLabelText: balanceLabel.text
property alias balanceText: balanceText.text
+ property alias balanceTextFiat: balanceTextFiat.text
+ property alias unlockedBalanceTextFiat: unlockedBalanceTextFiat.text
property alias networkStatus : networkStatus
property alias progressBar : progressBar
property alias daemonProgressBar : daemonProgressBar
property alias minutesToUnlockTxt: unlockedBalanceLabel.text
+ property bool fiatBalance: false
property int titleBarHeight: 50
property string copyValue: ""
Clipboard { id: clipboard }
@@ -202,6 +206,26 @@ Rectangle {
}
}
}
+ MoneroComponents.Label {
+ fontSize: 20
+ text: "¥"
+ color: "white"
+ visible: persistentSettings.fiatPriceEnabled
+ anchors.right: parent.right
+ anchors.rightMargin: 45
+ anchors.top: parent.top
+ anchors.topMargin: 28
+ themeTransition: false
+
+ MouseArea{
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ fiatBalance = !fiatBalance
+ }
+ }
+ }
}
Item {
@@ -214,7 +238,7 @@ Rectangle {
width: 50
MoneroComponents.TextPlain {
- visible: !isMobile
+ visible: !(fiatBalance && persistentSettings.fiatPriceEnabled)
id: balanceText
themeTransition: false
anchors.left: parent.left
@@ -256,8 +280,38 @@ Rectangle {
}
MoneroComponents.TextPlain {
+ visible: !balanceText.visible
+ id: balanceTextFiat
+ themeTransition: false
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ anchors.top: parent.top
+ anchors.topMargin: 76
+ font.family: "Arial"
+ color: "#FFFFFF"
+ text: "N/A"
+ font.pixelSize: balanceText.font.pixelSize
+ MouseArea {
+ hoverEnabled: true
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onEntered: {
+ parent.color = MoneroComponents.Style.orange
+ }
+ onExited: {
+ parent.color = MoneroComponents.Style.white
+ }
+ onClicked: {
+ console.log("Copied to clipboard");
+ clipboard.setText(parent.text);
+ appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
+ }
+ }
+ }
+
+ MoneroComponents.TextPlain {
id: unlockedBalanceText
- visible: true
+ visible: !(fiatBalance && persistentSettings.fiatPriceEnabled)
themeTransition: false
anchors.left: parent.left
anchors.leftMargin: 20
@@ -297,6 +351,36 @@ Rectangle {
}
}
+ MoneroComponents.TextPlain {
+ id: unlockedBalanceTextFiat
+ themeTransition: false
+ visible: !unlockedBalanceText.visible
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ anchors.top: parent.top
+ anchors.topMargin: 126
+ font.family: "Arial"
+ color: "#FFFFFF"
+ text: "N/A"
+ font.pixelSize: unlockedBalanceText.font.pixelSize
+ MouseArea {
+ hoverEnabled: true
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onEntered: {
+ parent.color = MoneroComponents.Style.orange
+ }
+ onExited: {
+ parent.color = MoneroComponents.Style.white
+ }
+ onClicked: {
+ console.log("Copied to clipboard");
+ clipboard.setText(parent.text);
+ appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
+ }
+ }
+ }
+
MoneroComponents.Label {
id: unlockedBalanceLabel
visible: true