aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-12-20 14:30:08 -0600
committerluigi1111 <luigi1111w@gmail.com>2018-12-20 14:30:08 -0600
commit1e4e9384eb14f7f1488484f0eedbecef19a15156 (patch)
tree06e2b7b5f908f10441a72815108baff898fbc1c2 /components
parent7cf94734be7f9758b74880a71fff50407f9da73b (diff)
parent84a60424efb90c680137294cb7338f41f8c9fe9d (diff)
downloadmonzero-gui-1e4e9384eb14f7f1488484f0eedbecef19a15156.tar.gz
monzero-gui-1e4e9384eb14f7f1488484f0eedbecef19a15156.tar.xz
monzero-gui-1e4e9384eb14f7f1488484f0eedbecef19a15156.zip
Merge pull request #1830
84a6042 mining: add visual icon/indicator that mining is enabled, visible on all the screens (mmbyday)
Diffstat (limited to 'components')
-rw-r--r--components/NetworkStatusItem.qml36
1 files changed, 30 insertions, 6 deletions
diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml
index edc22595..965948bd 100644
--- a/components/NetworkStatusItem.qml
+++ b/components/NetworkStatusItem.qml
@@ -43,7 +43,7 @@ Rectangle {
return qsTr("Synchronizing")
if(appWindow.remoteNodeConnected)
return qsTr("Remote node")
- return qsTr("Connected")
+ return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected")
}
if (status == Wallet.ConnectionStatus_WrongVersion)
return qsTr("Wrong version")
@@ -69,16 +69,30 @@ Rectangle {
Image {
anchors.top: parent.top
- anchors.topMargin: 6
+ anchors.topMargin: !appWindow.isMining ? 6 * scaleRatio : 4 * scaleRatio
anchors.right: parent.right
- anchors.rightMargin: 11
+ anchors.rightMargin: !appWindow.isMining ? 11 * scaleRatio : 0
source: {
- if(item.connected == Wallet.ConnectionStatus_Connected){
+ if(appWindow.isMining) {
+ return "../images/miningxmr.png"
+ } else if(item.connected == Wallet.ConnectionStatus_Connected) {
return "../images/lightning.png"
} else {
return "../images/lightning-white.png"
}
}
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ if(!appWindow.isMining) {
+ middlePanel.settingsView.settingsStateViewState = "Node";
+ appWindow.showPageRequest("Settings");
+ } else {
+ appWindow.showPageRequest("Mining")
+ }
+ }
+ }
}
}
@@ -108,9 +122,19 @@ Rectangle {
font.pixelSize: 20 * scaleRatio
color: "white"
text: getConnectionStatusString(item.connected) + translationManager.emptyString
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ if(!appWindow.isMining) {
+ middlePanel.settingsView.settingsStateViewState = "Node";
+ appWindow.showPageRequest("Settings");
+ } else {
+ appWindow.showPageRequest("Mining")
+ }
+ }
+ }
}
}
}
-
-
}