summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history_control.cpp8
-rw-r--r--plugins/NewStory/src/templates.cpp4
2 files changed, 7 insertions, 5 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)
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp
index 2809c36003..ad7510baaa 100644
--- a/plugins/NewStory/src/templates.cpp
+++ b/plugins/NewStory/src/templates.cpp
@@ -245,7 +245,7 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem)
if (iColor != -1)
buf.AppendFormat(L"<font color=#%06X>", color2html(iColor));
else
- buf.Append(L"<font>");
+ buf.Append(L"<font class=\"body\">");
p = p1;
}
else p--;
@@ -284,7 +284,7 @@ CMStringW ItemData::formatHtml(const wchar_t *pwszStr)
auto &F = g_fontTable[fontID];
wchar_t szFont[100];
- str.AppendFormat(L"body {margin: 0px; text-align: left; %s; color: NSText; overflow: auto;}\n", font2html(F.lf, szFont));
+ str.AppendFormat(L"body {margin: 0px; text-align: left; %s; overflow: auto;}\n", font2html(F.lf, szFont));
str.AppendFormat(L".nick {color: #%06X }\n", color2html(g_colorTable[dbe.bSent ? COLOR_OUTNICK : COLOR_INNICK].cl));
str.AppendFormat(L".link {color: #%06X }\n", color2html(g_colorTable[COLOR_LINK].cl));
str.AppendFormat(L".quote {border-left: 4px solid #%06X; padding-left: 8px; }\n", color2html(g_colorTable[COLOR_QUOTE].cl));