From 408e61f8f8e4bd0fd52085125da26bb5c425260e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 29 Apr 2025 13:06:43 +0300 Subject: =?UTF-8?q?fixes=20#4997=20(NewStory:=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=20=D1=81=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=B8=D0=B3?= =?UTF-8?q?=D0=BD=D0=BE=D1=80=D0=B8=D1=80=D1=83=D0=B5=D1=82=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D1=86=D0=B2=D0=B5?= =?UTF-8?q?=D1=82=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_control.cpp | 17 +++++++++++++---- plugins/NewStory/src/templates.cpp | 4 ++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index bea9d73618..bbfda96e28 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -864,11 +864,20 @@ void NewstoryListData::Paint(simpledib::dib &dib) litehtml::position clip(xPos, yPos, cachedWindowWidth - xPos - xRight, iItemHeigth); if (auto &pDoc = pItem->m_doc) { if (auto pBody = pDoc->root()->select_one("body")) { - litehtml::background back = pBody->css().get_bg(); - back.m_color = litehtml::web_color(GetRValue(clBack), GetGValue(clBack), GetBValue(clBack)); - pBody->css_w().set_bg(back); + if (auto pBbody = pBody->select_one("[id=bbody]")) { + litehtml::background back = pBbody->css().get_bg(); + back.m_color = litehtml::web_color(GetRValue(clBack), GetGValue(clBack), GetBValue(clBack)); - pBody->css_w().set_color(litehtml::web_color(GetRValue(clText), GetGValue(clText), GetBValue(clText))); + litehtml::web_color fore(GetRValue(clText), GetGValue(clText), GetBValue(clText)); + + pBbody->css_w().set_bg(back); + pBbody->css_w().set_color(fore); + + for (auto &it : pBbody->children()) { + it->css_w().set_bg(back); + it->css_w().set_color(fore); + } + } } pDoc->draw((UINT_PTR)dib.hdc(), xPos, yPos + iOffsetY, &clip); diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 7e3cb22d8c..2809c36003 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -319,7 +319,11 @@ CMStringW ItemData::formatHtml(const wchar_t *pwszStr) CMStringW szBody(wszOrigText); UrlAutodetect(szBody); + + str.Append(L"
"); AppendString(str, szBody, this); + str.Append(L"
"); + if (spRes) { int iOffset = 0; for (int i = 0; i < (int)sp.numSmileys; i++) { -- cgit v1.2.3