mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 11:22:05 +02:00
ProgressBar: fix conversion to percentage
This commit is contained in:
parent
76a105261e
commit
9393529613
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user