From 82553b0df20e1597fec83b72fcc8799477e762ae Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Thu, 23 Nov 2017 15:30:25 +0100 Subject: [PATCH] NetworkStatus section development --- LeftPanel.qml | 6 +++++- components/NetworkStatusItem.qml | 32 +++++++++++++++---------------- images/lightning-white.png | Bin 0 -> 362 bytes images/moneroIcon-28x28.png | Bin 0 -> 792 bytes qml.qrc | 2 ++ 5 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 images/lightning-white.png create mode 100644 images/moneroIcon-28x28.png 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 new file mode 100644 index 0000000000000000000000000000000000000000..ae1d6fc9699b0d7caa0658c59db3f4673efe94d3 GIT binary patch literal 362 zcmV-w0hRuVP)okbE5R1~!p;kVg^VYqj9 z4s5aTox{woWCS?I&Z&j#z>ibdu?js0kARw0cybE+7T$F5H_)&Omrmit!pp#)fq#Le z!c7I8JxMj=D_>+;_7bnp0B_E5+SYNp4!((PmKSa%Z5YRSmNW_8#{$+#&zXRJB7Oy$ z0>+7jt>VJdz-;gw8TedYfV&9419Kj38SC3+>jx1Ys4T#JfIoowGQ1M4cdFJ81AL{b z01r9-1Qx3BYOvl-SucLpwNe5+0$;#l3SP_CcT?9pz)*?#2Z)|;^k>S3SpWb407*qo IM6N<$f*A&r*8l(j literal 0 HcmV?d00001 diff --git a/images/moneroIcon-28x28.png b/images/moneroIcon-28x28.png new file mode 100644 index 0000000000000000000000000000000000000000..4ef14fd16dbb56809e70d8838bbdf0cc1a98d223 GIT binary patch literal 792 zcmV+z1LypSP)!plczWGtm|5yzdA9! z!wKmfx$ydyRC}3OU@EIDp>+Ehn6$K}?9jWYd|chF3Di$?W*jzD>E{6Z2G}*MKC?j5Xv8gCK?a|X@u}yR7#fdyxy6Wo2hNlC*QdQ zFoguk?OB@`gEX}?25WwdDs35ujeMKQXJa8j>_=FUMBS(rUPNAw=2lPX&nz%i0JF+c z(a3s+>q4#YBIfc;y- zy)ZWhjY7~f+dNR87z#ln(C#b6E1-Tc_or_+UY)kKwko2fSTdR9>guZ66xAr)R0G%7 z*V*3QzK2?Gzud!?mzT+8GL=2yuPtz`&{YkM$KwFZ%*+%}=@~A(KRrG5#M~vlHrOpE ze%3!8kF&G0bFcmE?2K3}=83s+V%w3ugmba?wJ-{+xnl3NwKYV9>FH@-m~_9!w6y+D zu)vFiExjWbs+t0SxBBYpDk4HhM+dQ3jC49(v9B4JgMqpHV@gCWZ1*7w{PcT#t*oqI zSr(4t)N<-Y0qoqJCA*uOn@PuUe3ulJu%n|R0)aqjb8>cecDLvP9vvO+1kP2p!56UH z0)2;vhs77L+b}62=>}qHU^0&tfi8Lsgxyg!VrF6Yo0J9bpnW2etOHBB%XnNcomponents/InlineButton.qml images/lightning.png images/leftPanelBg.jpg + images/moneroIcon-28x28.png + images/lightning-white.png