summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-03-18 12:19:44 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-03-18 12:19:44 +0300
commitadc7dfa815a2399e9d8e4017254087b70b7f1ff4 (patch)
tree4b7ebe58c8e0ba46be48a54387ac38dcf67cc8eb /plugins/NewStory/src
parent705c4d24c9c61edffc82864bf9c24384dc29a8d7 (diff)
fixes #4286 (NewStory: scrollbar in the edit field)
Diffstat (limited to 'plugins/NewStory/src')
-rw-r--r--plugins/NewStory/src/history_control.cpp5
1 files changed, 4 insertions, 1 deletions
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);