diff --git a/src/collectionpage/collectionquotawidget.cpp b/src/collectionpage/collectionquotawidget.cpp --- a/src/collectionpage/collectionquotawidget.cpp +++ b/src/collectionpage/collectionquotawidget.cpp @@ -62,7 +62,7 @@ void CollectionQuotaWidget::setQuotaInfo(qint64 current, qint64 maxValue) { - mProgressBar->setMaximum(maxValue); - mProgressBar->setValue(current); + int perc = qBound(0, qRound(100.0 * current / qMax(1LL, maxValue)), 100); + mProgressBar->setValue(perc); mUsage->setText(i18n("%1 of %2 used", KFormat().formatByteSize(qMax(0LL, current)), KFormat().formatByteSize(qMax(0LL, maxValue)))); }