Skip to content

Commit

Permalink
polish strikethrough a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrotter committed Feb 28, 2025
1 parent 5427272 commit 1f56c0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/librssguard/core/feedsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,8 @@ QVariant FeedsModel::data(const QModelIndex& index, int role) const {
case Qt::ItemDataRole::FontRole: {
RootItem* it = itemForIndex(index);
bool is_bold = it->countOfUnreadMessages() > 0;
bool is_striked = it->kind() == RootItem::Kind::Feed &&
qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::StrikethroughDisabledFeeds)).toBool() &&
qobject_cast<Feed*>(it)->isSwitchedOff();
bool is_striked = it->kind() == RootItem::Kind::Feed && it->toFeed()->isSwitchedOff() &&
qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::StrikethroughDisabledFeeds)).toBool();

return is_bold ? (is_striked ? m_boldStrikedFont : m_boldFont)
: (is_striked ? m_normalStrikedFont : m_normalFont);
Expand Down
2 changes: 1 addition & 1 deletion src/librssguard/miscellaneous/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ DKEY Feeds::EnableTooltipsFeedsMessages = "show_tooltips";
DVALUE(bool) Feeds::EnableTooltipsFeedsMessagesDef = true;

DKEY Feeds::StrikethroughDisabledFeeds = "strikethrough_disabled_feeds";
DVALUE(bool) Feeds::StrikethroughDisabledFeedsDef = false;
DVALUE(bool) Feeds::StrikethroughDisabledFeedsDef = true;

DKEY Feeds::PauseFeedFetching = "pause_feed_fetching";
DVALUE(bool) Feeds::PauseFeedFetchingDef = false;
Expand Down

0 comments on commit 1f56c0d

Please sign in to comment.