diff options
| author | Sander Ferdinand <sa.ferdinand@gmail.com> | 2017-11-23 15:30:25 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-29 23:04:00 +0100 |
| commit | 82553b0df20e1597fec83b72fcc8799477e762ae (patch) | |
| tree | 196d978ab0c74ae3fb4dd01b980a75c63ce4676d | |
| parent | dc445edaae6dd7cb98b5337566aa4a5495e97b6b (diff) | |
| download | monzero-gui-82553b0df20e1597fec83b72fcc8799477e762ae.tar.gz monzero-gui-82553b0df20e1597fec83b72fcc8799477e762ae.tar.xz monzero-gui-82553b0df20e1597fec83b72fcc8799477e762ae.zip | |
NetworkStatus section development
| -rw-r--r-- | LeftPanel.qml | 6 | ||||
| -rw-r--r-- | components/NetworkStatusItem.qml | 32 | ||||
| -rw-r--r-- | images/lightning-white.png | bin | 0 -> 362 bytes | |||
| -rw-r--r-- | images/moneroIcon-28x28.png | bin | 0 -> 792 bytes | |||
| -rw-r--r-- | qml.qrc | 2 |
5 files changed, 23 insertions, 17 deletions
diff --git a/LeftPanel.qml b/LeftPanel.qml index 51d0d70d..d9df22da 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -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 diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml index c7950636..984ffd03 100644 --- a/components/NetworkStatusItem.qml +++ b/components/NetworkStatusItem.qml @@ -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 } } diff --git a/images/lightning-white.png b/images/lightning-white.png Binary files differnew file mode 100644 index 00000000..ae1d6fc9 --- /dev/null +++ b/images/lightning-white.png diff --git a/images/moneroIcon-28x28.png b/images/moneroIcon-28x28.png Binary files differnew file mode 100644 index 00000000..4ef14fd1 --- /dev/null +++ b/images/moneroIcon-28x28.png @@ -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> |
