mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
COSMETIC: Display speeds with more user friendly units instead of always using KiB/s
This commit is contained in:
parent
c52e0cf841
commit
8b41d1973c
5 changed files with 9 additions and 8 deletions
|
@ -112,9 +112,9 @@ public:
|
|||
case TR_UPSPEED:
|
||||
case TR_DLSPEED:{
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
double speed = index.data().toDouble();
|
||||
qulonglong speed = index.data().toULongLong();
|
||||
opt.displayAlignment = Qt::AlignRight;
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::number(speed/1024., 'f', 1)+" "+tr("KiB/s"));
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, misc::friendlyUnit(speed)+tr("/s", "/second (.i.e per second)"));
|
||||
break;
|
||||
}
|
||||
case TR_RATIO:{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue