From a9172eee736e27f950c3b492589ce052fe90a0d0 Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 20 Feb 2008 23:31:03 +0000 Subject: [PATCH] [BUG_FIXED] Fix a small display drawback while switch from simple line tab to multi line tab. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@135 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 41 +++++-------------- .../src/WinControls/TaskList/TaskListDlg.h | 4 -- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index 28ee1b78b..2da0f2908 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -121,43 +121,22 @@ void TabBar::reSizeTo(RECT & rc2Ajust) else if (_isVertical) { TabsLength = RowCount * (RowRect.right - RowRect.left); - TabsLength += RowCount * GetSystemMetrics(SM_CXEDGE); + TabsLength += GetSystemMetrics(SM_CXEDGE); - rc2Ajust.left += TabsLength; - rc2Ajust.right -= TabsLength; + rc2Ajust.left += TabsLength + 5; + rc2Ajust.right -= TabsLength + 10; rc2Ajust.top += 5; rc2Ajust.bottom -= 10; - - if (_isMultiLine) - { - rc2Ajust.right -= 5; - } - else - { - rc2Ajust.left += 5; - rc2Ajust.right -= 10; - } } else { - rc2Ajust.top += 3; - rc2Ajust.bottom -= 8; - rc2Ajust.left += 1; - rc2Ajust.right -= 6; - - if (_isMultiLine) - { - TabsLength = RowCount * (RowRect.bottom - RowRect.top); - TabsLength += RowCount * GetSystemMetrics(SM_CYEDGE); - - rc2Ajust.top += TabsLength; - rc2Ajust.bottom -= TabsLength; - } - else - { - TabCtrl_AdjustRect(_hSelf, FALSE, &rc2Ajust); - rc2Ajust.bottom -= 20; - } + TabsLength = RowCount * (RowRect.bottom - RowRect.top); + TabsLength += GetSystemMetrics(SM_CYEDGE); + + rc2Ajust.top += TabsLength + 5; + rc2Ajust.bottom -= TabsLength + 10; + rc2Ajust.left += 5; + rc2Ajust.right -= 10; } } diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h index e26980dbc..aa807ed2b 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h @@ -41,10 +41,7 @@ struct TaskLstFnStatus { struct TaskListInfo { vector _tlfsLst; - //int _indexPrimary; - //int _indexSecondary; int _currentIndex; - //TaskListInfo() : _indexPrimary(0), _indexSecondary(0) {}; }; static HWND hWndServer = NULL; @@ -55,7 +52,6 @@ static LRESULT CALLBACK hookProc(UINT nCode, WPARAM wParam, LPARAM lParam) if ((nCode >= 0) && (wParam == WM_RBUTTONUP)) { ::PostMessage(hWndServer, WM_RBUTTONUP, 0, 0); - //NppParameters::getInstance()->_isTaskListRBUTTONUP_Active = true; } return ::CallNextHookEx(hook, nCode, wParam, lParam);