From: Manuel Nickschas Date: Sun, 5 Nov 2006 23:08:55 +0000 (+0000) Subject: More small tweaks to fix scrollbar behavior. This really sucks. X-Git-Tag: 0.1.0~253 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=f02f9f00b4cdb9819fcafbb33c4ee8b044f1f0f1;hp=59a71bb6795f9cf4b470742816ccf61afe1de9b0 More small tweaks to fix scrollbar behavior. This really sucks. --- 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(); }