mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Quota in Account Settings: properly round value
This commit is contained in:
parent
e398cfb27c
commit
4fde3f4a65
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,8 @@
|
|||
#include "mirall/owncloudsetupwizard.h"
|
||||
#include "mirall/mirallconfigfile.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QListWidgetItem>
|
||||
|
@ -483,7 +485,7 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
|||
ui->quotaProgressBar->setEnabled(true);
|
||||
// workaround the label only accepting ints (which may be only 32 bit wide)
|
||||
ui->quotaProgressBar->setMaximum(100);
|
||||
ui->quotaProgressBar->setValue(used/(double)total * 100);
|
||||
ui->quotaProgressBar->setValue(round(used/(double)total * 100));
|
||||
QString usedStr = Utility::octetsToString(used);
|
||||
QString totalStr = Utility::octetsToString(total);
|
||||
ui->quotaLabel->setText(tr("You are using %1 of your available %2 storage.").arg(usedStr, totalStr));
|
||||
|
|
Loading…
Reference in a new issue