use KiB for download progress as well

head-request
Zlatin Balevsky 2021-05-24 03:56:27 +01:00
parent d243e1cd31
commit f9ceb7854a
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 3 additions and 1 deletions

View File

@ -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) {