From 4cdf288cf2d1aefc01332db1bc73dc806df46be2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Aug 2023 19:38:44 +0300 Subject: =?UTF-8?q?NewStory:=20#3642=20(=D1=80=D0=B5=D0=B4=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D0=B9=20=D0=BD=D0=B5=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D0=B5=D1=82=20=D0=B2=20=D0=BD=D1=83=D0=B6?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D0=BC=D0=B5=D1=81=D1=82=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_array.cpp | 1 + plugins/NewStory/src/history_control.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index 9f53abd1df..f168335562 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -313,6 +313,7 @@ void ItemData::setText() data = MTextCreateEx(htuLog, this->wtext, MTEXT_FLG_WCHAR | MTEXT_FLG_RTF); else data = MTextCreateW(htuLog, Proto_GetBaseAccountName(hContact), ptrW(TplFormatString(getTemplate(), hContact, this))); + savedHeight = -1; } // Array diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index c358b918b5..7c33868ffe 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -383,8 +383,7 @@ int NewstoryListData::GetItemHeight(int index) RECT rc; GetClientRect(hwnd, &rc); int width = rc.right - rc.left; - SIZE sz; - sz.cx = width - 6; + SIZE sz = { width - 6, 0 }; MTextMeasure(hdc, &sz, (HANDLE)item->data); SelectObject(hdc, hOldFont); -- cgit v1.2.3