NetworkStatus section development

This commit is contained in:
Sander Ferdinand
2017-11-23 15:30:25 +01:00
committed by moneromooo-monero
parent dc445edaae
commit 82553b0df2
5 changed files with 23 additions and 17 deletions

View File

@@ -35,20 +35,6 @@ Rectangle {
color: "transparent"
property var connected: Wallet.ConnectionStatus_Disconnected
function getConnectionStatusImage(status) {
if (status == Wallet.ConnectionStatus_Connected)
return "../images/lightning.png"
else
return "../images/statusDisconnected.png"
}
function getConnectionStatusColor(status) {
if (status == Wallet.ConnectionStatus_Connected)
return "white"
else
return "#AAAAAA"
}
function getConnectionStatusString(status) {
if (status == Wallet.ConnectionStatus_Connected) {
if(!appWindow.daemonSynced)
@@ -72,13 +58,27 @@ Rectangle {
anchors.top: parent.top
width: 40 * scaleRatio
height: 40 * scaleRatio
opacity: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return 1
} else {
return 0.5
}
}
Image {
anchors.top: parent.top
anchors.topMargin: 6
anchors.right: parent.right
anchors.rightMargin: 11
source: getConnectionStatusImage(item.connected)
source: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return "../images/lightning.png"
} else {
return "../images/lightning-white.png"
}
}
//getConnectionStatusImage(item.connected)
}
}
@@ -108,7 +108,7 @@ Rectangle {
anchors.topMargin: 14
font.family: Style.fontMedium.name
font.pixelSize: 20 * scaleRatio
color: getConnectionStatusColor(item.connected)
color: "white"
text: getConnectionStatusString(item.connected) + translationManager.emptyString
}
}