Browse Source

[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
pull/343/head^2
donho 17 years ago
parent
commit
a9172eee73
  1. 39
      PowerEditor/src/WinControls/TabBar/TabBar.cpp
  2. 4
      PowerEditor/src/WinControls/TaskList/TaskListDlg.h

39
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;
TabsLength = RowCount * (RowRect.bottom - RowRect.top);
TabsLength += GetSystemMetrics(SM_CYEDGE);
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;
}
rc2Ajust.top += TabsLength + 5;
rc2Ajust.bottom -= TabsLength + 10;
rc2Ajust.left += 5;
rc2Ajust.right -= 10;
}
}

4
PowerEditor/src/WinControls/TaskList/TaskListDlg.h

@ -41,10 +41,7 @@ struct TaskLstFnStatus {
struct TaskListInfo {
vector<TaskLstFnStatus> _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);

Loading…
Cancel
Save