From 33aa78b58cd86f9b8e38032ff157ff614c23d73c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Mar 2024 20:38:35 +0300 Subject: various drawing quirks --- plugins/NewStory/src/history_array.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/NewStory/src/history_array.cpp') diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index a22708743e..e9cc5989fa 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -214,14 +214,16 @@ int ItemData::calcHeight(int top, int width, POINT *pPos) if (m_bOfflineDownloaded != 0) // Download completed icon sz.cx -= 18; + leftOffset = pos.x; if (savedHeight == -1) { m_doc->render(sz.cx); - savedHeight = m_doc->height(); + savedHeight = m_doc->height() + 5; + Netlib_Logf(0, "Event %d rendered to %d with width %d", dbe.getEvent(), savedHeight, sz.cx); } if (pPos) *pPos = pos; - return savedHeight + 5; + return savedHeight; } void ItemData::checkCreate() @@ -457,8 +459,6 @@ void ItemData::load(bool bLoadAlways) void ItemData::setText() { m_doc = litehtml::document::createFromString(formatHtml(), &pOwner->webPage); - m_doc->render(pOwner->cachedWindowWidth); - savedHeight = m_doc->height(); } // Array -- cgit v1.2.3