From 99f6af5d383916168d6edb1b7a05fd64b633f03b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Apr 2024 12:19:34 +0300 Subject: =?UTF-8?q?fixes=20#4366=20(tabSRMM:=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BD=D0=B5=20=D0=B2=D0=B8=D0=B4=D0=BD=D1=8B,?= =?UTF-8?q?=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BB=D0=B8=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE?= =?UTF-8?q?=D0=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/TabSRMM/src/buttonsbar.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'plugins/TabSRMM/src') 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; -- cgit v1.2.3