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
This commit is contained in:
Stefano Ceccherini 2008-02-07 14:52:16 +00:00
parent ffa3002c15
commit 1d7596167d
2 changed files with 9 additions and 4 deletions

View File

@ -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
}

View File

@ -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);