From 9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Apr 2011 02:54:00 +0300 Subject: Possible fix chat scrolling in near bottom position. --- src/gui/widgets/tabbedarea.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index be817a68a..e76ac6d57 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -255,11 +255,13 @@ void TabbedArea::widgetResized(const gcn::Event &event _UNUSED_) if (mFollowDownScroll && height != 0) { gcn::Rectangle rect = w->getDimension(); - if (rect.height != 0 && rect.height > height) + if (rect.height != 0 && rect.height > height + 2) { scr = dynamic_cast(w); if (scr && scr->getVerticalScrollAmount() - == scr->getVerticalMaxScroll()) + >= scr->getVerticalMaxScroll() - 2 + && scr->getVerticalScrollAmount() + <= scr->getVerticalMaxScroll() + 2) { newScroll = scr->getVerticalScrollAmount() + rect.height - height; -- cgit v1.2.3-60-g2f50