mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-25 02:36:10 +03:00
Small change in progress bar percentage
This commit is contained in:
parent
c6248fb162
commit
0e89ec3737
3 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ class PreviewListDelegate: public QItemDelegate {
|
||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBarV2 newopt;
|
||||||
qreal progress = index.data().toDouble()*100.;
|
qreal progress = index.data().toDouble()*100.;
|
||||||
newopt.rect = opt.rect;
|
newopt.rect = opt.rect;
|
||||||
newopt.text = misc::accurateDoubleToString(progress, 1) + "%";
|
newopt.text = ((progress == 100.0) ? QString("100%") : misc::accurateDoubleToString(progress, 1) + "%");
|
||||||
newopt.progress = (int)progress;
|
newopt.progress = (int)progress;
|
||||||
newopt.maximum = 100;
|
newopt.maximum = 100;
|
||||||
newopt.minimum = 0;
|
newopt.minimum = 0;
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBarV2 newopt;
|
||||||
qreal progress = index.data().toDouble()*100.;
|
qreal progress = index.data().toDouble()*100.;
|
||||||
newopt.rect = opt.rect;
|
newopt.rect = opt.rect;
|
||||||
newopt.text = misc::accurateDoubleToString(progress, 1) + "%";
|
newopt.text = ((progress == 100.0) ? QString("100%") : misc::accurateDoubleToString(progress, 1) + "%");
|
||||||
newopt.progress = (int)progress;
|
newopt.progress = (int)progress;
|
||||||
newopt.maximum = 100;
|
newopt.maximum = 100;
|
||||||
newopt.minimum = 0;
|
newopt.minimum = 0;
|
||||||
|
|
|
@ -186,7 +186,7 @@ void TransferListDelegate::paint(QPainter * painter, const QStyleOptionViewItem
|
||||||
QStyleOptionProgressBarV2 newopt;
|
QStyleOptionProgressBarV2 newopt;
|
||||||
qreal progress = index.data().toDouble()*100.;
|
qreal progress = index.data().toDouble()*100.;
|
||||||
newopt.rect = opt.rect;
|
newopt.rect = opt.rect;
|
||||||
newopt.text = misc::accurateDoubleToString(progress, 1) + "%";
|
newopt.text = ((progress == 100.0) ? QString("100%") : misc::accurateDoubleToString(progress, 1) + "%");
|
||||||
newopt.progress = (int)progress;
|
newopt.progress = (int)progress;
|
||||||
newopt.maximum = 100;
|
newopt.maximum = 100;
|
||||||
newopt.minimum = 0;
|
newopt.minimum = 0;
|
||||||
|
|
Loading…
Reference in a new issue