diff options
author | George Hazan <george.hazan@gmail.com> | 2024-04-19 12:19:34 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-04-19 12:19:39 +0300 |
commit | 99f6af5d383916168d6edb1b7a05fd64b633f03b (patch) | |
tree | 9a40b3cf8eafd61402c7a928bc075939fb666e3e /plugins/TabSRMM/src/buttonsbar.cpp | |
parent | 932786374e56f39fa7d0ecea29163f30ebb8582a (diff) |
fixes #4366 (tabSRMM: кнопки не видны, если включить показ панели кнопок)
Diffstat (limited to 'plugins/TabSRMM/src/buttonsbar.cpp')
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index a3d455615d..83eedfcecc 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -247,6 +247,7 @@ BOOL CMsgDialog::BB_SetButtonsPos() bool bAutoHidden = mapHidden[cbd]; + int iCmd = SW_SHOW; if (showToolbar) { if (!cbd->m_bSeparator && !IsWindowEnabled(hwndButton) && !bAutoHidden) tempL -= cbd->m_iButtonWidth + gap; @@ -254,18 +255,16 @@ BOOL CMsgDialog::BB_SetButtonsPos() if (cbd->m_bCanBeHidden && !cbd->m_bHidden) { if (!bAutoHidden) { if (tempL + tempR > (rect.right - foravatar) && (cbd->m_bSeparator || IsWindowVisible(hwndButton))) { - ShowWindow(hwndButton, SW_HIDE); + iCmd = SW_HIDE; bAutoHidden = true; tempL -= cbd->m_iButtonWidth + gap; } } - else { - ShowWindow(hwndButton, SW_SHOW); - bAutoHidden = false; - } + else bAutoHidden = false; } } - else ShowWindow(hwndButton, SW_HIDE); + else iCmd = SW_HIDE; + ShowWindow(hwndButton, iCmd); hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, lwidth, splitterY - iOff - 2, 0, 0, SWP_NOZORDER | SWP_NOSIZE); if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(bAutoHidden || cbd->m_bHidden))) @@ -291,6 +290,7 @@ BOOL CMsgDialog::BB_SetButtonsPos() bool bAutoHidden = mapHidden[cbd]; + int iCmd = SW_SHOW; if (showToolbar) { if (!cbd->m_bSeparator && !IsWindowVisible(hwndButton) && !IsWindowEnabled(hwndButton) && !bAutoHidden) tempR -= cbd->m_iButtonWidth + gap; @@ -298,18 +298,16 @@ BOOL CMsgDialog::BB_SetButtonsPos() if (cbd->m_bCanBeHidden && !cbd->m_bHidden) { if (!bAutoHidden) { if (tempL + tempR > (rect.right - foravatar) && (cbd->m_bSeparator || IsWindowVisible(hwndButton))) { - ShowWindow(hwndButton, SW_HIDE); + iCmd = SW_HIDE; bAutoHidden = true; tempR -= cbd->m_iButtonWidth + gap; } } - else { - ShowWindow(hwndButton, SW_SHOW); - bAutoHidden = false; - } + else bAutoHidden = false; } } - else ShowWindow(hwndButton, SW_HIDE); + else iCmd = SW_HIDE; + ShowWindow(hwndButton, iCmd); if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(bAutoHidden || cbd->m_bHidden))) rwidth += cbd->m_iButtonWidth + gap; |