summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-25 02:54:00 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-25 02:54:00 +0300
commit9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f (patch)
treef693b0e0af90faaca951bf67c2db6843822d5a08
parent3bbaedbdf939152b667837d8f9569df359af97ff (diff)
downloadplus-9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f.tar.gz
plus-9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f.tar.bz2
plus-9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f.tar.xz
plus-9373adc5956b57f2b8bc16ba0c66ffcc031b9c2f.zip
Possible fix chat scrolling in near bottom position.
-rw-r--r--src/gui/widgets/tabbedarea.cpp6
1 files 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<ScrollArea*>(w);
if (scr && scr->getVerticalScrollAmount()
- == scr->getVerticalMaxScroll())
+ >= scr->getVerticalMaxScroll() - 2
+ && scr->getVerticalScrollAmount()
+ <= scr->getVerticalMaxScroll() + 2)
{
newScroll = scr->getVerticalScrollAmount()
+ rect.height - height;