From: Jocelyn Turcotte Date: Sun, 30 Aug 2015 13:57:33 +0000 (+0200) Subject: Move the progress bar to the right of the quota label X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1408^2~144 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c48c5b9286b926ae22d9a4298e8ee39d760a0f34;p=nextcloud-desktop.git Move the progress bar to the right of the quota label Also change the label to show the free space and show the used and total space only on a tooltip of the bar. Related to #3644 --- diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 56377b41f..cdc45f661 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -409,16 +409,18 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used) ui->quotaProgressBar->setVisible(true); ui->quotaProgressBar->setEnabled(true); // workaround the label only accepting ints (which may be only 32 bit wide) - ui->quotaProgressBar->setMaximum(100); const double percent = used/(double)total*100; const int percentInt = qMin(qRound(percent), 100); ui->quotaProgressBar->setValue(percentInt); QString usedStr = Utility::octetsToString(used); QString totalStr = Utility::octetsToString(total); QString percentStr = Utility::compactFormatDouble(percent, 1); - ui->quotaInfoLabel->setText(tr("Storage space: %1 (%3%) of %2 in use").arg(usedStr, totalStr, percentStr)); + QString toolTip = tr("%1 (%3%) of %2 in use. Some folders, including network mounted or shared folders, might have different limits.").arg(usedStr, totalStr, percentStr); + ui->quotaInfoLabel->setText(tr("%1 of %2 in use").arg(usedStr, totalStr)); + ui->quotaInfoLabel->setToolTip(toolTip); + ui->quotaProgressBar->setToolTip(toolTip); } else { - ui->quotaProgressBar->setMaximum(0); + ui->quotaProgressBar->setVisible(false); ui->quotaInfoLabel->setText(tr("Currently there is no storage usage information available.")); } } diff --git a/src/gui/accountsettings.ui b/src/gui/accountsettings.ui index c3921f1ff..43bac5740 100644 --- a/src/gui/accountsettings.ui +++ b/src/gui/accountsettings.ui @@ -15,23 +15,8 @@ - - - - 0 - 0 - - - - false - - - - - - true - - + + 0 @@ -45,115 +30,107 @@ 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - Connected with <server> as <user> - - - true - - - true - - - - - - - - 0 - 0 - - - - Remove the account configuration from the client - - - Delete - - - - + + + + 0 + 0 + + + + + - + - + 0 0 - - Some folders, including network mounted or shared folders, might have different limits. - - Storage space: ... + Connected with <server> as <user> true + + true + - - - false - - - - 16777215 - 7 - - - - 0 + + + + 0 + 0 + - - -1 + + Remove the account configuration from the client - - false + + Delete + + + + + + + 0 + 0 + + + + + + + Storage space: ... + + + false + + + + + + + false + + + + 0 + 0 + + + + + 16777215 + 7 + + + + 100 + + + -1 + + + false + + + + +