fix: stay at the end of the bufferwidget when zoomed in
authorAlexander von Renteln <phon@quassel-irc.org>
Sat, 25 Oct 2008 22:25:52 +0000 (00:25 +0200)
committerAlexander von Renteln <phon@quassel-irc.org>
Sat, 25 Oct 2008 22:25:52 +0000 (00:25 +0200)
src/qtui/chatview.cpp

index 6e55bba..ed71dd0 100644 (file)
@@ -84,7 +84,7 @@ void ChatView::lastLineChanged(QGraphicsItem *chatLine, qreal offset) {
   Q_UNUSED(chatLine)
   QAbstractSlider *vbar = verticalScrollBar();
   Q_ASSERT(vbar);
   Q_UNUSED(chatLine)
   QAbstractSlider *vbar = verticalScrollBar();
   Q_ASSERT(vbar);
-  if(vbar->maximum() - vbar->value() <= offset + 5) { // 5px grace area
+  if(vbar->maximum() - vbar->value() <= (offset + 5) * _currentScaleFactor ) { // 5px grace area
     vbar->setValue(vbar->maximum());
   }
 }
     vbar->setValue(vbar->maximum());
   }
 }