mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 13:11:36 +03:00
Do not use hardcoded colors in RSS feed view
This commit is contained in:
parent
ce36a7ca62
commit
72da2e7252
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle)
|
||||||
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
||||||
{
|
{
|
||||||
auto item = mapRSSArticle(rssArticle);
|
auto item = mapRSSArticle(rssArticle);
|
||||||
item->setData(Qt::ForegroundRole, QColor("grey"));
|
item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Inactive, QPalette::WindowText));
|
||||||
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
||||||
|
|
||||||
checkInvariant();
|
checkInvariant();
|
||||||
|
@ -119,11 +119,11 @@ QListWidgetItem *ArticleListWidget::createItem(RSS::Article *article) const
|
||||||
item->setData(Qt::DisplayRole, article->title());
|
item->setData(Qt::DisplayRole, article->title());
|
||||||
item->setData(Qt::UserRole, reinterpret_cast<quintptr>(article));
|
item->setData(Qt::UserRole, reinterpret_cast<quintptr>(article));
|
||||||
if (article->isRead()) {
|
if (article->isRead()) {
|
||||||
item->setData(Qt::ForegroundRole, QColor("grey"));
|
item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Inactive, QPalette::WindowText));
|
||||||
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setData(Qt::ForegroundRole, QColor("blue"));
|
item->setData(Qt::ForegroundRole, QPalette().color(QPalette::Active, QPalette::Link));
|
||||||
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere2.png"));
|
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere2.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue