mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Improve coding style
This commit is contained in:
parent
acad35c5bc
commit
c41df9ffbd
147 changed files with 4454 additions and 2227 deletions
|
@ -54,12 +54,14 @@ void PreviewListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
|
|||
QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option);
|
||||
drawBackground(painter, opt, index);
|
||||
|
||||
switch (index.column()) {
|
||||
switch (index.column())
|
||||
{
|
||||
case PreviewSelectDialog::SIZE:
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
|
||||
case PreviewSelectDialog::PROGRESS: {
|
||||
case PreviewSelectDialog::PROGRESS:
|
||||
{
|
||||
const qreal progress = (index.data().toReal() * 100);
|
||||
|
||||
QStyleOptionProgressBar newopt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue