summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_control.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-05-04 17:25:37 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-05-04 17:25:37 +0300
commitf1d587c11cdfcbf509e4905509170a8d3dd7259a (patch)
tree6bffca1a45b5a3a33c29bd477b4a3c6d6e03ec35 /plugins/NewStory/src/history_control.cpp
parentfa42258672f6a15e3decfd5300afeec1539ad656 (diff)
NewStory: fix for drawing unknown / invalid [color] [color/]
Diffstat (limited to 'plugins/NewStory/src/history_control.cpp')
-rw-r--r--plugins/NewStory/src/history_control.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index a9eb58109b..c30c7cdc1c 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -734,9 +734,11 @@ static void recursive_set_color(element::ptr el, const web_color &fore, const ba
el->css_w().set_bg(back);
el->css_w().set_color(fore);
- for (auto &it : el->children())
- if (it->tag() != _a_ && it->tag() != _font_)
- recursive_set_color(it, fore, back);
+ for (auto &it : el->children()) {
+ if (it->tag() == _a_ || (it->tag() == _font_ && mir_strcmp(it->get_attr("class"), "body")))
+ continue;
+ recursive_set_color(it, fore, back);
+ }
}
void NewstoryListData::Paint(simpledib::dib &dib)