mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-29 23:26:24 +01:00
NetworkStatus section development
This commit is contained in:
parent
dc445edaae
commit
82553b0df2
@ -573,9 +573,11 @@ Rectangle {
|
|||||||
id: networkStatus
|
id: networkStatus
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 4
|
||||||
|
anchors.rightMargin: 4
|
||||||
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
||||||
connected: Wallet.ConnectionStatus_Disconnected
|
connected: Wallet.ConnectionStatus_Disconnected
|
||||||
height: 40 * scaleRatio
|
height: progressBar.visible ? 40 * scaleRatio : 60 * scaleRatio
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressBar {
|
ProgressBar {
|
||||||
@ -595,6 +597,8 @@ Rectangle {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
syncType: qsTr("Daemon")
|
syncType: qsTr("Daemon")
|
||||||
visible: networkStatus.connected
|
visible: networkStatus.connected
|
||||||
|
anchors.leftMargin: 4 * scaleRatio
|
||||||
|
anchors.rightMargin: 4 * scaleRatio
|
||||||
height: 62 * scaleRatio
|
height: 62 * scaleRatio
|
||||||
}
|
}
|
||||||
} // menuRect
|
} // menuRect
|
||||||
|
@ -35,20 +35,6 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
property var connected: Wallet.ConnectionStatus_Disconnected
|
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) {
|
function getConnectionStatusString(status) {
|
||||||
if (status == Wallet.ConnectionStatus_Connected) {
|
if (status == Wallet.ConnectionStatus_Connected) {
|
||||||
if(!appWindow.daemonSynced)
|
if(!appWindow.daemonSynced)
|
||||||
@ -72,13 +58,27 @@ Rectangle {
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
width: 40 * scaleRatio
|
width: 40 * scaleRatio
|
||||||
height: 40 * scaleRatio
|
height: 40 * scaleRatio
|
||||||
|
opacity: {
|
||||||
|
if(item.connected == Wallet.ConnectionStatus_Connected){
|
||||||
|
return 1
|
||||||
|
} else {
|
||||||
|
return 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 6
|
anchors.topMargin: 6
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 11
|
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
|
anchors.topMargin: 14
|
||||||
font.family: Style.fontMedium.name
|
font.family: Style.fontMedium.name
|
||||||
font.pixelSize: 20 * scaleRatio
|
font.pixelSize: 20 * scaleRatio
|
||||||
color: getConnectionStatusColor(item.connected)
|
color: "white"
|
||||||
text: getConnectionStatusString(item.connected) + translationManager.emptyString
|
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>components/InlineButton.qml</file>
|
||||||
<file>images/lightning.png</file>
|
<file>images/lightning.png</file>
|
||||||
<file>images/leftPanelBg.jpg</file>
|
<file>images/leftPanelBg.jpg</file>
|
||||||
|
<file>images/moneroIcon-28x28.png</file>
|
||||||
|
<file>images/lightning-white.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
Reference in New Issue
Block a user