Account Settings: Use native highlight color

This commit is contained in:
Daniel Molkentin 2013-08-18 17:00:37 +02:00
parent 71b1e881d8
commit cea9b389bf

View file

@ -38,6 +38,16 @@
namespace Mirall { namespace Mirall {
static const char progressBarStyleC[] =
"QProgressBar {"
"border: 2px solid grey;"
"border-radius: 5px;"
"text-align: center;"
"}"
"QProgressBar::chunk {"
"background-color: %1; width: 1px;"
"}";
AccountSettings::AccountSettings(QWidget *parent) : AccountSettings::AccountSettings(QWidget *parent) :
QWidget(parent), QWidget(parent),
ui(new Ui::AccountSettings), ui(new Ui::AccountSettings),
@ -75,7 +85,8 @@ AccountSettings::AccountSettings(QWidget *parent) :
connect(ui->_folderList, SIGNAL(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex))); connect(ui->_folderList, SIGNAL(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(QModelIndex))); connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(QModelIndex)));
ui->quotaProgressBar->setStyleSheet(" QProgressBar { border: 2px solid grey; border-radius: 5px; text-align: center; } QProgressBar::chunk {background-color: #05B8CC; width: 1px;}"); QColor color = palette().highlight().color();
ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));
ownCloudInfo *ocInfo = ownCloudInfo::instance(); ownCloudInfo *ocInfo = ownCloudInfo::instance();
slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes()); slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes());
connect(ocInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotUpdateQuota(qint64,qint64))); connect(ocInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotUpdateQuota(qint64,qint64)));