From cea9b389bf19bfb012a5edbd9a543ee5c5d449d9 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Sun, 18 Aug 2013 17:00:37 +0200 Subject: [PATCH] Account Settings: Use native highlight color --- src/mirall/accountsettings.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp index 4e42996d5..fd81beef4 100644 --- a/src/mirall/accountsettings.cpp +++ b/src/mirall/accountsettings.cpp @@ -38,6 +38,16 @@ 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) : QWidget(parent), 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(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(); slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes()); connect(ocInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotUpdateQuota(qint64,qint64)));