The termview was resized 2 pixels less than needed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23861 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-02-04 10:46:24 +00:00
parent 56e415dda1
commit 894a6c6217
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -314,9 +314,9 @@ void
TermView::GetPreferredSize(float *width, float *height)
{
if (width)
*width = fTermColumns * fFontWidth - 1;
*width = fTermColumns * fFontWidth;
if (height)
*height = fTermRows * fFontHeight - 1;
*height = fTermRows * fFontHeight;
}
@@ -353,7 +353,7 @@ TermView::SetTermSize(int rows, int cols, bool resize)
fScrTop = 0;
fScrBot = fTermRows - 1;
BRect rect(0, 0, fTermColumns * fFontWidth - 1, fTermRows * fFontHeight - 1);
BRect rect(0, 0, fTermColumns * fFontWidth, fTermRows * fFontHeight);
if (resize)
ResizeTo(rect.Width(), rect.Height());
+2 -1
View File
@@ -698,7 +698,8 @@ TermWindow::_ResizeView(TermView *view)
float width, height;
view->GetPreferredSize(&width, &height);
width += B_V_SCROLL_BAR_WIDTH;
height += fMenubar->Bounds().Height();
height += fMenubar->Bounds().Height() + 2;
ResizeTo(width, height);
view->Invalidate();