From 894a6c62173403c4b7c4e2e3228b0101f8f66fce Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 4 Feb 2008 10:46:24 +0000 Subject: [PATCH] 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 --- src/apps/terminal/TermView.cpp | 6 +++--- src/apps/terminal/TermWindow.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 7e3fc6f24f..ef2807a46f 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -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()); diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp index 5d73658bbb..f512f03397 100644 --- a/src/apps/terminal/TermWindow.cpp +++ b/src/apps/terminal/TermWindow.cpp @@ -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();