Skip to content

Commit

Permalink
[UPDATE] Reduce the margin of edit zone.
Browse files Browse the repository at this point in the history
- Notepad-plus svn trunk @ 842
  • Loading branch information
donho committed Nov 9, 2011
1 parent e5a1d11 commit d97f365
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions PowerEditor/src/WinControls/TabBar/TabBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ 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
// We don't need to resize the contained windows if they are even invisible anyway
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
Expand All @@ -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;
}
}

Expand Down

0 comments on commit d97f365

Please sign in to comment.