X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=gui%2Fbuffer.cpp;h=3892ee95b08af767d8403e315d5bd23169a2145b;hp=4718b28748f7979683219b4e10cfaf9dd84faff3;hb=f02f9f00b4cdb9819fcafbb33c4ee8b044f1f0f1;hpb=59a71bb6795f9cf4b470742816ccf61afe1de9b0 diff --git a/gui/buffer.cpp b/gui/buffer.cpp index 4718b287..3892ee95 100644 --- a/gui/buffer.cpp +++ b/gui/buffer.cpp @@ -63,7 +63,7 @@ QWidget * Buffer::showWidget(QWidget *parent) { widget->setTopic(topic); widget->updateNickList(nicks); //widget->renderContents(); - widget->scrollToEnd(); + //widget->scrollToEnd(); connect(widget, SIGNAL(userInput(QString)), this, SLOT(userInput(QString))); return qobject_cast(widget); } @@ -131,6 +131,7 @@ BufferWidget::BufferWidget(QString netname, QString bufname, bool act, QString o connect(ui.inputEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed())); ui.chatWidget->setFocusProxy(ui.inputEdit); + ui.chatWidget->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); opsExpanded = voicedExpanded = usersExpanded = true; @@ -149,9 +150,10 @@ BufferWidget::BufferWidget(QString netname, QString bufname, bool act, QString o int i = contents.count() - 100; if(i < 0) i = 0; for(int j = 0; j < i; j++) contents.removeAt(0); + show(); renderContents(); updateTitle(); - show(); + //show(); } void BufferWidget::updateTitle() { @@ -172,16 +174,22 @@ void BufferWidget::setActive(bool act) { if(act != active) { active = act; renderContents(); + //scrollToEnd(); } } void BufferWidget::renderContents() { QString html; + //html = ""; for(int i = 0; i < contents.count(); i++) { html += htmlFromMsg(contents[i]); } - ui.chatWidget->clear(); - ui.chatWidget->setHtml(html); + //ui.chatWidget->clear(); + hide(); + ui.chatWidget->setHtml(html); show(); + //ui.chatWidget->insertHtml("
"); // <-- bug that would not reset the scrollbar sizes... scrollToEnd(); }