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 ++++++++----------- src/resources.qrc | 5 ++++- src/resources/status_active.png | Bin 0 -> 641 bytes src/resources/status_awaiting.png | Bin 0 -> 631 bytes src/resources/status_inactive.png | Bin 0 -> 597 bytes 5 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 src/resources/status_active.png create mode 100644 src/resources/status_awaiting.png create mode 100644 src/resources/status_inactive.png (limited to 'src') 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()); diff --git a/src/resources.qrc b/src/resources.qrc index 85cd6ec7..8434b367 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -25,7 +25,7 @@ resources/view-refresh_16.png resources/software-update-available.png resources/emblem-important.png - resources/check.png + resources/check.png mo_icon.ico resources/dialog-warning.png resources/symbol-backup.png @@ -65,6 +65,9 @@ resources/badge_8.png resources/badge_9.png resources/badge_more.png + resources/status_active.png + resources/status_awaiting.png + resources/status_inactive.png resources/contents/jigsaw-piece.png diff --git a/src/resources/status_active.png b/src/resources/status_active.png new file mode 100644 index 00000000..62fd50d6 Binary files /dev/null and b/src/resources/status_active.png differ diff --git a/src/resources/status_awaiting.png b/src/resources/status_awaiting.png new file mode 100644 index 00000000..4818431f Binary files /dev/null and b/src/resources/status_awaiting.png differ diff --git a/src/resources/status_inactive.png b/src/resources/status_inactive.png new file mode 100644 index 00000000..711c4b52 Binary files /dev/null and b/src/resources/status_inactive.png differ -- cgit v1.3.1