mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-08 20:09:48 +00:00
NetworkStatus section development
This commit is contained in:
parent
dc445edaae
commit
82553b0df2
5 changed files with 23 additions and 17 deletions
|
@ -573,9 +573,11 @@ Rectangle {
|
|||
id: networkStatus
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
||||
connected: Wallet.ConnectionStatus_Disconnected
|
||||
height: 40 * scaleRatio
|
||||
height: progressBar.visible ? 40 * scaleRatio : 60 * scaleRatio
|
||||
}
|
||||
|
||||
ProgressBar {
|
||||
|
@ -595,6 +597,8 @@ Rectangle {
|
|||
anchors.bottom: parent.bottom
|
||||
syncType: qsTr("Daemon")
|
||||
visible: networkStatus.connected
|
||||
anchors.leftMargin: 4 * scaleRatio
|
||||
anchors.rightMargin: 4 * scaleRatio
|
||||
height: 62 * scaleRatio
|
||||
}
|
||||
} // menuRect
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
BIN
images/lightning-white.png
Normal file
BIN
images/lightning-white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 362 B |
BIN
images/moneroIcon-28x28.png
Normal file
BIN
images/moneroIcon-28x28.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 792 B |
2
qml.qrc
2
qml.qrc
|
@ -187,5 +187,7 @@
|
|||
<file>components/InlineButton.qml</file>
|
||||
<file>images/lightning.png</file>
|
||||
<file>images/leftPanelBg.jpg</file>
|
||||
<file>images/moneroIcon-28x28.png</file>
|
||||
<file>images/lightning-white.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in a new issue