summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-25 14:57:58 +0200
committerTannin <devnull@localhost>2015-05-25 14:57:58 +0200
commitafab0cec7e0783b51b3354e66ddcd74935cbb47a (patch)
tree9ce3a4b78fd1db86bb011dbd14d329dad499f848 /src
parent02cc97a58d7cda800b8c431dfeaa3242e5f0b69d (diff)
compact download view now uses icons instead of colors to distinguish state
Diffstat (limited to 'src')
-rw-r--r--src/downloadlistwidgetcompact.cpp19
-rw-r--r--src/resources.qrc5
-rw-r--r--src/resources/status_active.pngbin0 -> 641 bytes
-rw-r--r--src/resources/status_awaiting.pngbin0 -> 631 bytes
-rw-r--r--src/resources/status_inactive.pngbin0 -> 597 bytes
5 files changed, 12 insertions, 12 deletions
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<img src=\":/MO/gui/inactive\">").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<img src=\":/MO/gui/check\">").arg(tr("Installed")));
} else if (state == DownloadManager::STATE_UNINSTALLED) {
- m_DoneLabel->setText(tr("Uninstalled"));
- m_DoneLabel->setForegroundRole(QPalette::Dark);
+ m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/awaiting\">").arg(tr("Uninstalled")));
} else {
- m_DoneLabel->setText(tr("Done"));
- m_DoneLabel->setForegroundRole(QPalette::WindowText);
+ m_DoneLabel->setText(QString("%1<img src=\":/MO/gui/active\">").arg(tr("Done")));
}
if (m_Manager->isInfoIncomplete(downloadIndex)) {
m_NameLabel->setText("<img src=\":/MO/gui/warning_16\"/> " + 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 @@
<file alias="refresh">resources/view-refresh_16.png</file>
<file alias="update_available">resources/software-update-available.png</file>
<file alias="important">resources/emblem-important.png</file>
- <file>resources/check.png</file>
+ <file alias="check">resources/check.png</file>
<file>mo_icon.ico</file>
<file alias="warning">resources/dialog-warning.png</file>
<file alias="emblem_backup">resources/symbol-backup.png</file>
@@ -65,6 +65,9 @@
<file alias="badge_8">resources/badge_8.png</file>
<file alias="badge_9">resources/badge_9.png</file>
<file alias="badge_more">resources/badge_more.png</file>
+ <file alias="active">resources/status_active.png</file>
+ <file alias="awaiting">resources/status_awaiting.png</file>
+ <file alias="inactive">resources/status_inactive.png</file>
</qresource>
<qresource prefix="/MO/gui/content">
<file alias="plugin">resources/contents/jigsaw-piece.png</file>
diff --git a/src/resources/status_active.png b/src/resources/status_active.png
new file mode 100644
index 00000000..62fd50d6
--- /dev/null
+++ b/src/resources/status_active.png
Binary files differ
diff --git a/src/resources/status_awaiting.png b/src/resources/status_awaiting.png
new file mode 100644
index 00000000..4818431f
--- /dev/null
+++ b/src/resources/status_awaiting.png
Binary files differ
diff --git a/src/resources/status_inactive.png b/src/resources/status_inactive.png
new file mode 100644
index 00000000..711c4b52
--- /dev/null
+++ b/src/resources/status_inactive.png
Binary files differ