From: Manuel Nickschas Date: Sun, 3 Aug 2008 22:46:02 +0000 (+0200) Subject: Make ChatView's scrollbar behavior a bit more tolerant to workaround BR 238 for now X-Git-Tag: 0.3.0~132 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=b8393cf7150270830deb26e9621f642ffff77d4c Make ChatView's scrollbar behavior a bit more tolerant to workaround BR 238 for now --- diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 70605ccd..cd71aac8 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -42,6 +42,7 @@ class ChatScene : public QGraphicsScene { Buffer *buffer() const; inline QAbstractItemModel *model() const { return _model; } + inline QString idString() const { return _idString; } public slots: void setWidth(qreal); diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index ffd9e72a..98346ca4 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -67,7 +67,7 @@ void ChatView::resizeEvent(QResizeEvent *event) { void ChatView::sceneHeightChanged(qreal h) { Q_UNUSED(h) - bool scrollable = verticalScrollBar()->value() == verticalScrollBar()->maximum(); + bool scrollable = qAbs(verticalScrollBar()->value() - verticalScrollBar()->maximum()) <= 2; // be a bit tolerant here, also FIXME (why we need this?) setSceneRect(scene()->sceneRect()); if(scrollable) verticalScrollBar()->setValue(verticalScrollBar()->maximum()); }