mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-12 07:48:04 +00:00
Right align header text that also has right-aligned row text. Closes #2188.
This commit is contained in:
parent
f61675d98a
commit
e907306b41
@ -383,6 +383,30 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (role == Qt::TextAlignmentRole) {
|
||||||
|
switch(section) {
|
||||||
|
case TorrentModelItem::TR_AMOUNT_DOWNLOADED:
|
||||||
|
case TorrentModelItem::TR_AMOUNT_UPLOADED:
|
||||||
|
case TorrentModelItem::TR_AMOUNT_LEFT:
|
||||||
|
case TorrentModelItem::TR_COMPLETED:
|
||||||
|
case TorrentModelItem::TR_SIZE:
|
||||||
|
case TorrentModelItem::TR_TOTAL_SIZE:
|
||||||
|
case TorrentModelItem::TR_ETA:
|
||||||
|
case TorrentModelItem::TR_SEEDS:
|
||||||
|
case TorrentModelItem::TR_PEERS:
|
||||||
|
case TorrentModelItem::TR_UPSPEED:
|
||||||
|
case TorrentModelItem::TR_DLSPEED:
|
||||||
|
case TorrentModelItem::TR_UPLIMIT:
|
||||||
|
case TorrentModelItem::TR_DLLIMIT:
|
||||||
|
case TorrentModelItem::TR_RATIO_LIMIT:
|
||||||
|
case TorrentModelItem::TR_RATIO:
|
||||||
|
case TorrentModelItem::TR_PRIORITY:
|
||||||
|
case TorrentModelItem::TR_LAST_ACTIVITY:
|
||||||
|
return Qt::AlignRight;
|
||||||
|
default:
|
||||||
|
return QAbstractListModel::headerData(section, orientation, role);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
Loading…
Reference in New Issue
Block a user