Skip to content

Commit

Permalink
Use better icons for RSS articles (qbittorrent#20587)
Browse files Browse the repository at this point in the history
  • Loading branch information
glassez authored Mar 22, 2024
1 parent b489262 commit 845f9a8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/rss/articlelistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)

const QBrush foregroundBrush {UIThemeManager::instance()->getColor(u"RSS.ReadArticle"_s)};
item->setData(Qt::ForegroundRole, foregroundBrush);
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"loading"_s, u"sphere"_s));
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"rss_read_article"_s, u"sphere"_s));

checkInvariant();
}
Expand All @@ -131,13 +131,13 @@ QListWidgetItem *ArticleListWidget::createItem(RSS::Article *article) const
{
const QBrush foregroundBrush {UIThemeManager::instance()->getColor(u"RSS.ReadArticle"_s)};
item->setData(Qt::ForegroundRole, foregroundBrush);
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"loading"_s, u"sphere"_s));
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"rss_read_article"_s, u"sphere"_s));
}
else
{
const QBrush foregroundBrush {UIThemeManager::instance()->getColor(u"RSS.UnreadArticle"_s)};
item->setData(Qt::ForegroundRole, foregroundBrush);
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"loading"_s, u"sphere"_s));
item->setData(Qt::DecorationRole, UIThemeManager::instance()->getIcon(u"rss_unread_article"_s, u"sphere"_s));
}

return item;
Expand Down
2 changes: 2 additions & 0 deletions src/gui/uithemecommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ inline QSet<QString> defaultUIThemeIcons()
u"queued"_s,
u"ratio"_s,
u"reannounce"_s,
u"rss_read_article"_s,
u"rss_unread_article"_s,
u"security-high"_s,
u"security-low"_s,
u"set-location"_s,
Expand Down
2 changes: 2 additions & 0 deletions src/icons/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@
<file>queued.svg</file>
<file>ratio.svg</file>
<file>reannounce.svg</file>
<file>rss_read_article.png</file>
<file>rss_unread_article.png</file>
<file>security-high.svg</file>
<file>security-low.svg</file>
<file>set-location.svg</file>
Expand Down
Binary file added src/icons/rss_read_article.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/rss_unread_article.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 845f9a8

Please sign in to comment.