diff options
author | George Hazan <ghazan@miranda.im> | 2020-07-13 12:00:06 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-07-13 12:00:06 +0300 |
commit | 331a65ffc21684134006d40459129024e9c0910b (patch) | |
tree | fc0d0b54df0e234526e9b8a6a69870db4d88ebe3 /src | |
parent | d10fcec7752615894ccfe356f5ec14b2eb2a8b0b (diff) |
fixes #2484 (rtf control: ограничить ширину меню разумным значением)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/srmm_log_rtf.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mir_app/src/srmm_log_rtf.cpp b/src/mir_app/src/srmm_log_rtf.cpp index a5132a9af0..d54800df29 100644 --- a/src/mir_app/src/srmm_log_rtf.cpp +++ b/src/mir_app/src/srmm_log_rtf.cpp @@ -322,9 +322,12 @@ INT_PTR CRtfLogWindow::WndProc(UINT msg, WPARAM wParam, LPARAM lParam) EnableMenuItem(hSubMenu, 2, flags); if (pszWord && pszWord[0]) { - wchar_t szMenuText[4096]; - mir_snwprintf(szMenuText, TranslateT("Look up '%s':"), pszWord); - ModifyMenu(hSubMenu, 4, MF_STRING | MF_BYPOSITION, 4, szMenuText); + CMStringW wszText(FORMAT, TranslateT("Look up '%s':"), pszWord); + if (wszText.GetLength() > 30) { + wszText.Truncate(30); + wszText.AppendChar('\''); + } + ModifyMenu(hSubMenu, 4, MF_STRING | MF_BYPOSITION, 4, wszText); } else ModifyMenu(hSubMenu, 4, MF_STRING | MF_GRAYED | MF_BYPOSITION, 4, TranslateT("No word to look up")); |