From e6c6e964f8cefc5f1d7e5fe3fa57e501eddab58e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 5 Jun 2022 15:12:40 +0300 Subject: =?UTF-8?q?fixes=20#3086=20(tabSRMM:=20=D0=BD=D0=B5=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=BD=D0=BE=D1=81=D1=82=D1=8C=D1=8E=20=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=B6=D0=B0=D0=B5=D1=82=D1=81=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=D1=81=D0=BA=D0=B0=D0=B7=D0=BA=D0=B0=20=D0=BA=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/button.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mir_app/src/button.cpp b/src/mir_app/src/button.cpp index 60d31ba0d7..4a9b548c83 100644 --- a/src/mir_app/src/button.cpp +++ b/src/mir_app/src/button.cpp @@ -454,20 +454,22 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR bct->hwndToolTips = ptt->hwnd; } } - TOOLINFO ti = {0}; + TOOLINFO ti = {}; ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND; ti.hwnd = bct->hwnd; ti.uId = (UINT_PTR)bct->hwnd; if (SendMessage(bct->hwndToolTips, TTM_GETTOOLINFO, 0, (LPARAM)&ti)) SendMessage(bct->hwndToolTips, TTM_DELTOOL, 0, (LPARAM)&ti); - ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS; + + ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; ti.uId = (UINT_PTR)bct->hwnd; if (lParam & BATF_UNICODE) ti.lpszText = mir_wstrdup(TranslateW((wchar_t*)wParam)); else ti.lpszText = Langpack_PcharToTchar((char*)wParam); SendMessage(bct->hwndToolTips, TTM_ADDTOOL, 0, (LPARAM)&ti); + SendMessage(bct->hwndToolTips, TTM_SETMAXTIPWIDTH, 0, 300); mir_free(ti.lpszText); } break; -- cgit v1.2.3