From d50afa23b4d7ab3bb24fdab54db5c7229ff8f5e2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 30 Apr 2016 15:24:19 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16795 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clui.cpp | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index ab054410b0..1b7121dbc7 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -1667,35 +1667,36 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; case WM_EXITSIZEMOVE: - { - int res = DefWindowProc(m_hWnd, msg, wParam, lParam); - ReleaseCapture(); - TRACE("WM_EXITSIZEMOVE\n"); - SendMessage(m_hWnd, WM_ACTIVATE, (WPARAM)WA_ACTIVE, (LPARAM)m_hWnd); - return res; - } + { + int res = DefWindowProc(m_hWnd, msg, wParam, lParam); + ReleaseCapture(); + TRACE("WM_EXITSIZEMOVE\n"); + SendMessage(m_hWnd, WM_ACTIVATE, (WPARAM)WA_ACTIVE, (LPARAM)m_hWnd); + return res; + } case WM_SIZING: return DefWindowProc(m_hWnd, msg, wParam, lParam); case WM_MOVE: - { - RECT rc; - CallWindowProc(DefWindowProc, m_hWnd, msg, wParam, lParam); - mutex_bDuringSizing = 0; - GetWindowRect(m_hWnd, &rc); - CheckFramesPos(&rc); - Sync(CLUIFrames_OnMoving, m_hWnd, &rc); - if (!IsIconic(m_hWnd)) { - if (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { // if g_CluiData.fDocked, dont remember pos (except for width) - db_set_dw(NULL, "CList", "Height", (DWORD)(rc.bottom - rc.top)); - db_set_dw(NULL, "CList", "x", (DWORD)rc.left); - db_set_dw(NULL, "CList", "y", (DWORD)rc.top); + { + RECT rc; + CallWindowProc(DefWindowProc, m_hWnd, msg, wParam, lParam); + mutex_bDuringSizing = 0; + GetWindowRect(m_hWnd, &rc); + CheckFramesPos(&rc); + Sync(CLUIFrames_OnMoving, m_hWnd, &rc); + if (!IsIconic(m_hWnd)) { + if (!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0)) { // if g_CluiData.fDocked, dont remember pos (except for width) + db_set_dw(NULL, "CList", "Height", (DWORD)(rc.bottom - rc.top)); + db_set_dw(NULL, "CList", "x", (DWORD)rc.left); + db_set_dw(NULL, "CList", "y", (DWORD)rc.top); + } + db_set_dw(NULL, "CList", "Width", (DWORD)(rc.right - rc.left)); } - db_set_dw(NULL, "CList", "Width", (DWORD)(rc.right - rc.left)); } - } - return TRUE; + return TRUE; + case WM_SIZE: if (g_mutex_bSizing) return 0; if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/) { @@ -2315,7 +2316,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL * pnmc) if (newHeight < (rcWorkArea.bottom - rcWorkArea.top)*minHeight / 100) newHeight = (rcWorkArea.bottom - rcWorkArea.top)*minHeight / 100; - if (newHeight>(rcWorkArea.bottom - rcWorkArea.top)*maxHeight / 100) + if (newHeight > (rcWorkArea.bottom - rcWorkArea.top)*maxHeight / 100) newHeight = (rcWorkArea.bottom - rcWorkArea.top)*maxHeight / 100; if (newHeight == (rcWindow.bottom - rcWindow.top)) return 0; -- cgit v1.2.3