From 9393529613c8149994b3dced1fce45ab057ca2df Mon Sep 17 00:00:00 2001 From: stoffu Date: Tue, 3 Apr 2018 11:49:27 +0900 Subject: [PATCH] ProgressBar: fix conversion to percentage --- components/ProgressBar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ProgressBar.qml b/components/ProgressBar.qml index 5fc5ec9b..4dd9326c 100644 --- a/components/ProgressBar.qml +++ b/components/ProgressBar.qml @@ -42,7 +42,7 @@ Rectangle { function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){ if(targetBlock > 0) { var remaining = (currentBlock < targetBlock) ? targetBlock - currentBlock : 0 - var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : 100*(currentBlock / targetBlock).toFixed(0) + var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : (100*(currentBlock / targetBlock)).toFixed(0) fillLevel = progressLevel if(typeof statusTxt != "undefined" && statusTxt != "") { progressText.text = statusTxt;