X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatview.cpp;h=85fb48ac52c992f50206ee4b1b8ebfbcf56b13e4;hp=e8a06f13fab59856b1f9fae4bf5bdbad7a174392;hb=3f354bcce2cecfe88a46de90cbf94ffd1bc7c506;hpb=064dcac965d1e724a0434683685a24ec7e6ba855 diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index e8a06f13..85fb48ac 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -54,7 +54,7 @@ ChatView::ChatView(MessageFilter *filter, QWidget *parent) void ChatView::init(MessageFilter *filter) { setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setAlignment(Qt::AlignBottom|Qt::AlignLeft); + setAlignment(Qt::AlignBottom); setInteractive(true); //setOptimizationFlags(QGraphicsView::DontClipPainter | QGraphicsView::DontAdjustForAntialiasing); // setOptimizationFlags(QGraphicsView::DontAdjustForAntialiasing); @@ -66,10 +66,6 @@ void ChatView::init(MessageFilter *filter) { _scrollTimer.setSingleShot(true); connect(&_scrollTimer, SIGNAL(timeout()), SLOT(scrollTimerTimeout())); - _resizeTimer.setInterval(100); - _resizeTimer.setSingleShot(true); - connect(&_resizeTimer, SIGNAL(timeout()), SLOT(resizeTimerTimeout())); - _scene = new ChatScene(filter, filter->idString(), viewport()->width() - 4, this); // see below: resizeEvent() connect(_scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(sceneRectChanged(const QRectF &))); connect(_scene, SIGNAL(lastLineChanged(QGraphicsItem *, qreal)), this, SLOT(lastLineChanged(QGraphicsItem *, qreal))); @@ -77,7 +73,6 @@ void ChatView::init(MessageFilter *filter) { setScene(_scene); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(verticalScrollbarChanged(int))); - connect(QtUi::style(), SIGNAL(changed()), this, SLOT(styleChanged())); } bool ChatView::event(QEvent *event) { @@ -109,10 +104,6 @@ bool ChatView::event(QEvent *event) { void ChatView::resizeEvent(QResizeEvent *event) { QGraphicsView::resizeEvent(event); - _resizeTimer.start(); -} - -void ChatView::resizeTimerTimeout() { // we can reduce viewport updates if we scroll to the bottom allready at the beginning verticalScrollBar()->setValue(verticalScrollBar()->maximum()); @@ -180,10 +171,6 @@ void ChatView::verticalScrollbarChanged(int newPos) { vbar->setValue(vbar->maximum()); } -void ChatView::styleChanged() { - scene()->layout(); -} - MsgId ChatView::lastMsgId() const { if(!scene()) return MsgId();