From afab0cec7e0783b51b3354e66ddcd74935cbb47a Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 25 May 2015 14:57:58 +0200 Subject: compact download view now uses icons instead of colors to distinguish state --- src/downloadlistwidgetcompact.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/downloadlistwidgetcompact.cpp') diff --git a/src/downloadlistwidgetcompact.cpp b/src/downloadlistwidgetcompact.cpp index e37d5ef5..32a3f10d 100644 --- a/src/downloadlistwidgetcompact.cpp +++ b/src/downloadlistwidgetcompact.cpp @@ -53,7 +53,8 @@ DownloadListWidgetCompactDelegate::DownloadListWidgetCompactDelegate(DownloadMan m_DoneLabel->setVisible(false); - connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)), this, SLOT(stateChanged(int,DownloadManager::DownloadState))); + connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)), + this, SLOT(stateChanged(int,DownloadManager::DownloadState))); connect(manager, SIGNAL(downloadRemoved(int)), this, SLOT(resetCache(int))); } @@ -116,24 +117,20 @@ void DownloadListWidgetCompactDelegate::paintRegularDownload(int downloadIndex) if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR)) { m_DoneLabel->setVisible(true); m_Progress->setVisible(false); - m_DoneLabel->setText(tr("Paused")); - m_DoneLabel->setForegroundRole(QPalette::Link); + m_DoneLabel->setText(QString("%1").arg(tr("Paused"))); } else if (state == DownloadManager::STATE_FETCHINGMODINFO) { - m_DoneLabel->setText(tr("Fetching Info 1")); + m_DoneLabel->setText(QString("%1").arg(tr("Fetching Info 1"))); } else if (state == DownloadManager::STATE_FETCHINGFILEINFO) { - m_DoneLabel->setText(tr("Fetching Info 2")); + m_DoneLabel->setText(QString("%1").arg(tr("Fetching Info 2"))); } else if (state >= DownloadManager::STATE_READY) { m_DoneLabel->setVisible(true); m_Progress->setVisible(false); if (state == DownloadManager::STATE_INSTALLED) { - m_DoneLabel->setText(tr("Installed")); - m_DoneLabel->setForegroundRole(QPalette::Mid); + m_DoneLabel->setText(QString("%1").arg(tr("Installed"))); } else if (state == DownloadManager::STATE_UNINSTALLED) { - m_DoneLabel->setText(tr("Uninstalled")); - m_DoneLabel->setForegroundRole(QPalette::Dark); + m_DoneLabel->setText(QString("%1").arg(tr("Uninstalled"))); } else { - m_DoneLabel->setText(tr("Done")); - m_DoneLabel->setForegroundRole(QPalette::WindowText); + m_DoneLabel->setText(QString("%1").arg(tr("Done"))); } if (m_Manager->isInfoIncomplete(downloadIndex)) { m_NameLabel->setText(" " + m_NameLabel->text()); -- cgit v1.3.1