From 1d7596167d9d16fabbaf75e526219d145f539a27 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Thu, 7 Feb 2008 14:52:16 +0000 Subject: [PATCH] Call BScrollBar::SetSteps() with the correct values also on font change, and when a scrollbar is attached. Fixes bug #1759 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23913 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/TermView.cpp | 11 ++++++++--- src/apps/terminal/TermView.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 460882b2a9..087019c69e 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -461,6 +461,10 @@ TermView::SetTermFont(const BFont *font) fTop = fTop * fFontHeight; fCursorHeight = fFontHeight; + + if (fScrollBar != NULL) { + fScrollBar->SetSteps(fFontHeight, fFontHeight * fTermRows); + } } @@ -468,6 +472,9 @@ void TermView::SetScrollBar(BScrollBar *scrollBar) { fScrollBar = scrollBar; + if (fScrollBar != NULL) { + fScrollBar->SetSteps(fFontHeight, fFontHeight * fTermRows); + } } @@ -2295,9 +2302,7 @@ TermView::GetSelection(BString &str) void TermView::NotifyQuit(int32 reason) { - // TODO: If we are a replicant, we can't just quit the BWindow, no?. - // Exactly, and the same is true for tabs! - Window()->PostMessage(B_QUIT_REQUESTED); + // implemented in subclasses } diff --git a/src/apps/terminal/TermView.h b/src/apps/terminal/TermView.h index 1860dae0de..706c4bbd30 100644 --- a/src/apps/terminal/TermView.h +++ b/src/apps/terminal/TermView.h @@ -155,7 +155,7 @@ private: inline void _Redraw(int, int, int, int); void _DoPrint(BRect updateRect); - void _ResizeScrBarRange (void); + void _ResizeScrBarRange(void); void _DoFileDrop(entry_ref &ref); void _WritePTY(const uchar *text, int num_byteses);