From adc7dfa815a2399e9d8e4017254087b70b7f1ff4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Mar 2024 12:19:44 +0300 Subject: fixes #4286 (NewStory: scrollbar in the edit field) --- plugins/NewStory/src/history_control.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index c23ea117d3..2aafa3e58c 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -243,7 +243,10 @@ void NewstoryListData::BeginEditItem() wszText.Replace(L"\r\n", L"\n"); wszText.Replace(L"\n", L"\r\n"); - uint32_t dwStyle = WS_CHILD | WS_BORDER | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL; + uint32_t dwStyle = WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOVSCROLL; + if (itemHeight > height) + dwStyle |= WS_VSCROLL; + hwndEditBox = CreateWindow(L"EDIT", wszText, dwStyle, 0, top, width, min(height, itemHeight), m_hwnd, NULL, g_plugin.getInst(), NULL); mir_subclassWindow(hwndEditBox, HistoryEditWndProc); SendMessage(hwndEditBox, WM_SETFONT, (WPARAM)g_fontTable[fontid].hfnt, 0); -- cgit v1.2.3