From 72da2e72521d2fec0744db9bb0a33ac2a8a33f99 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Sat, 18 Feb 2017 12:21:18 +0100 Subject: [PATCH] Do not use hardcoded colors in RSS feed view --- src/gui/rss/articlelistwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/rss/articlelistwidget.cpp b/src/gui/rss/articlelistwidget.cpp index 79fe5113a..fe6fa05fd 100644 --- a/src/gui/rss/articlelistwidget.cpp +++ b/src/gui/rss/articlelistwidget.cpp @@ -94,7 +94,7 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle) void ArticleListWidget::handleArticleRead(RSS::Article *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")); checkInvariant(); @@ -119,11 +119,11 @@ QListWidgetItem *ArticleListWidget::createItem(RSS::Article *article) const item->setData(Qt::DisplayRole, article->title()); item->setData(Qt::UserRole, reinterpret_cast(article)); 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")); } 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")); }