https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab1868c7bf7f700f9363a5553cb07d73b9ea962b
commit ab1868c7bf7f700f9363a5553cb07d73b9ea962b Author: Carl J. Bialorucki <cbia...@outlook.com> AuthorDate: Thu Aug 10 09:21:03 2023 -0600 Commit: George Bișoc <george.bi...@reactos.org> CommitDate: Mon Oct 2 22:39:10 2023 +0200 Set maximum balloon width for notification area --- base/shell/explorer/syspager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/base/shell/explorer/syspager.cpp b/base/shell/explorer/syspager.cpp index 35eb0faf75f..b039f189101 100644 --- a/base/shell/explorer/syspager.cpp +++ b/base/shell/explorer/syspager.cpp @@ -21,6 +21,8 @@ #include "precomp.h" +#define BALLOON_MAXWIDTH 340 + struct InternalIconData : NOTIFYICONDATA { // Must keep a separate copy since the original is unioned with uTimeout. @@ -617,19 +619,19 @@ void CBalloonQueue::Show(Info& info) // TODO: NIF_REALTIME, NIIF_NOSOUND, other Vista+ flags - const int index = IndexOf(info.pSource); + m_current = info.pSource; RECT rc; - m_toolbar->GetItemRect(index, &rc); + m_toolbar->GetItemRect(IndexOf(m_current), &rc); m_toolbar->ClientToScreen(&rc); const WORD x = (rc.left + rc.right) / 2; const WORD y = (rc.top + rc.bottom) / 2; m_tooltips->SetTitle(info.szInfoTitle, info.uIcon); m_tooltips->TrackPosition(x, y); + m_tooltips->SetMaxTipWidth(BALLOON_MAXWIDTH); m_tooltips->UpdateTipText(m_hwndParent, reinterpret_cast<LPARAM>(m_toolbar->m_hWnd), info.szInfo); m_tooltips->TrackActivate(m_hwndParent, reinterpret_cast<LPARAM>(m_toolbar->m_hWnd)); - m_current = info.pSource; int timeout = info.uTimeout; if (timeout < MinTimeout) timeout = MinTimeout; if (timeout > MaxTimeout) timeout = MaxTimeout;