widget->setTopic(topic);
widget->updateNickList(nicks);
//widget->renderContents();
- widget->scrollToEnd();
+ //widget->scrollToEnd();
connect(widget, SIGNAL(userInput(QString)), this, SLOT(userInput(QString)));
return qobject_cast<QWidget*>(widget);
}
connect(ui.inputEdit, SIGNAL(returnPressed()), this, SLOT(enterPressed()));
ui.chatWidget->setFocusProxy(ui.inputEdit);
+ ui.chatWidget->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
opsExpanded = voicedExpanded = usersExpanded = true;
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() {
if(act != active) {
active = act;
renderContents();
+ //scrollToEnd();
}
}
void BufferWidget::renderContents() {
QString html;
+ //html = "<style type=\"text/css\">"
+ // ".test { background-color:#339933 }"
+ // "</style>";
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("<div />"); // <-- bug that would not reset the scrollbar sizes...
scrollToEnd();
}