From f9ceb7854a68aeeb4586f11d0b3a12c99e77445a Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 24 May 2021 03:56:27 +0100 Subject: [PATCH] use KiB for download progress as well --- .../groovy/com/muwire/gui/DownloadProgressRenderer.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/src/main/groovy/com/muwire/gui/DownloadProgressRenderer.groovy b/gui/src/main/groovy/com/muwire/gui/DownloadProgressRenderer.groovy index c2a0695e..fe7c1ccc 100644 --- a/gui/src/main/groovy/com/muwire/gui/DownloadProgressRenderer.groovy +++ b/gui/src/main/groovy/com/muwire/gui/DownloadProgressRenderer.groovy @@ -23,7 +23,9 @@ class DownloadProgressRenderer extends DefaultTableCellRenderer { int percent = -1 if (pieces != 0) percent = (done * 100 / pieces) - String totalSize = DataHelper.formatSize2Decimal(d.length, false) + "B" + StringBuffer sb = new StringBuffer() + SizeFormatter.format(d.length, sb) + String totalSize = sb.toString() + "B" setText(String.format("%2d", percent) + "% of ${totalSize}".toString()) if (isSelected) {