mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
parent
cfedbf8e6b
commit
60faba60ea
6 changed files with 28 additions and 3 deletions
|
@ -192,6 +192,18 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
QItemDelegate::drawDisplay(painter, opt, option.rect, elapsedString);
|
||||
}
|
||||
break;
|
||||
|
||||
case TransferListModel::TR_AVAILABILITY: {
|
||||
const qreal availability = index.data().toReal();
|
||||
if (hideValues && (availability <= 0))
|
||||
break;
|
||||
|
||||
const QString availabilityStr = Utils::String::fromDouble(availability, 3);
|
||||
opt.displayAlignment = (Qt::AlignRight | Qt::AlignVCenter);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, availabilityStr);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue