From daec0f042a14abd413d17b8d4df1264312d2b1ce Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 9 Nov 2011 22:44:12 +0000 Subject: [PATCH] [UPDATE] Reduce the margin of edit zone. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@842 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index edd042411..3cbb47793 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -181,6 +181,7 @@ void TabBar::reSizeTo(RECT & rc2Ajust) { RECT RowRect; int RowCount, TabsLength; + const int marge = 2; // Important to do that! // Otherwise, the window(s) it contains will take all the resouce of CPU @@ -188,7 +189,6 @@ void TabBar::reSizeTo(RECT & rc2Ajust) display(rc2Ajust.right > 10); RECT rc = rc2Ajust; Window::reSizeTo(rc); - //TabCtrl_AdjustRect(_hSelf, FALSE, &rc2Ajust); // Do our own calculations because TabCtrl_AdjustRect doesn't work // on vertical or multi-lined tab controls @@ -204,20 +204,20 @@ void TabBar::reSizeTo(RECT & rc2Ajust) TabsLength = RowCount * (RowRect.right - RowRect.left); TabsLength += GetSystemMetrics(SM_CXEDGE); - rc2Ajust.left += TabsLength + 5; - rc2Ajust.right -= TabsLength + 10; - rc2Ajust.top += 5; - rc2Ajust.bottom -= 10; + rc2Ajust.left += TabsLength + marge; + rc2Ajust.right -= TabsLength + (marge * 2); + rc2Ajust.top += marge; + rc2Ajust.bottom -= (marge * 2); } else { TabsLength = RowCount * (RowRect.bottom - RowRect.top); TabsLength += GetSystemMetrics(SM_CYEDGE); - rc2Ajust.top += TabsLength + 5; - rc2Ajust.bottom -= TabsLength + 10; - rc2Ajust.left += 5; - rc2Ajust.right -= 10; + rc2Ajust.top += TabsLength + marge; + rc2Ajust.bottom -= TabsLength + (marge * 2); + rc2Ajust.left += marge; + rc2Ajust.right -= marge * 2; } }