X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatview.cpp;h=4a5e286c174aa8f1ecffa0652cb958bff95c0546;hp=ce79b65ddd844f26fb5780c4df7c2654e27566da;hb=23245ed934bb8120852ee008b4c74989728c9e27;hpb=e2689c4568c0dcd83f74c1095623cb3fa702204f diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index ce79b65d..4a5e286c 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -50,7 +50,7 @@ void ChatView::init(MessageFilter *filter) { setAlignment(Qt::AlignBottom); setInteractive(true); - _scene = new ChatScene(filter, filter->idString(), viewport()->width(), this); + _scene = new ChatScene(filter, filter->idString(), viewport()->width() - 2, this); // see below: resizeEvent() connect(_scene, SIGNAL(sceneHeightChanged(qreal)), this, SLOT(sceneHeightChanged(qreal))); setScene(_scene); @@ -75,6 +75,9 @@ void ChatView::verticalScrollbarChanged(int newPos) { QAbstractSlider *vbar = verticalScrollBar(); Q_ASSERT(vbar); + if(vbar->maximum() - vbar->value() <= 5) // FIXME workaround the fact that the view gets scrolled up a few px on buffer change + vbar->setValue(vbar->maximum()); + if(newPos < _lastScrollbarPos) { int relativePos = 100; if(vbar->maximum() - vbar->minimum() != 0)