summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/buttonsbar.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-07 21:35:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-07 21:35:38 +0300
commit7d4424c249762c3ace80975342009fccce60df2b (patch)
tree54855f08af76fe1a72c829d9cf9e39dfbfae1506 /plugins/TabSRMM/src/buttonsbar.cpp
parentb087c0c0087bcc47122823e6b9e3188101bb9f4d (diff)
tabSRMM: both window types to use the same spliiter Y
Diffstat (limited to 'plugins/TabSRMM/src/buttonsbar.cpp')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 8aaf17a9b3..b3a610fa71 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -206,26 +206,24 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
if (!m_hwnd || !IsWindowVisible(m_hwnd))
return 0;
- HWND hwnd = m_hwnd;
- RECT rect;
HWND hwndButton = 0;
BYTE gap = DPISCALEX_S(db_get_b(NULL, SRMSGMOD, "ButtonsBarGap", 1));
bool showToolbar = !(m_pContainer->dwFlags & CNT_HIDETOOLBAR);
bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
- HWND hwndToggleSideBar = GetDlgItem(hwnd, IDC_TOGGLESIDEBAR);
+ HWND hwndToggleSideBar = GetDlgItem(m_hwnd, IDC_TOGGLESIDEBAR);
ShowWindow(hwndToggleSideBar, (showToolbar && m_pContainer->SideBar->isActive()) ? SW_SHOW : SW_HIDE);
HDWP hdwp = BeginDeferWindowPos(Srmm_GetButtonCount() + 1);
RECT rcSplitter;
- GetWindowRect(GetDlgItem(hwnd, (m_bType == SESSIONTYPE_IM) ? IDC_SPLITTERY : IDC_SPLITTERY), &rcSplitter);
-
+ GetWindowRect(GetDlgItem(m_hwnd, IDC_SPLITTERY), &rcSplitter);
POINT ptSplitter = { 0, rcSplitter.top };
- ScreenToClient(hwnd, &ptSplitter);
+ ScreenToClient(m_hwnd, &ptSplitter);
- GetClientRect(hwnd, &rect);
+ RECT rect;
+ GetClientRect(m_hwnd, &rect);
int splitterY = (!bBottomToolbar) ? ptSplitter.y - DPISCALEY_S(1) : rect.bottom;
int tempL = m_bbLSideWidth, tempR = m_bbRSideWidth;
@@ -249,7 +247,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
continue;
if (((m_bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((m_bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
- hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
+ hwndButton = GetDlgItem(m_hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
ShowWindow(hwndButton, SW_HIDE);
@@ -299,7 +297,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos()
continue;
if (((m_bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((m_bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
- hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
+ hwndButton = GetDlgItem(m_hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
ShowWindow(hwndButton, SW_HIDE);