mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Cleanup ChatMessageArea.cpp
This commit is contained in:
parent
45402336ac
commit
8b904b91ea
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
ChatMessageArea::ChatMessageArea() : QTextBrowser() {
|
||||
connect(document()->documentLayout(), &QAbstractTextDocumentLayout::documentSizeChanged,
|
||||
this, &ChatMessageArea::updateLayout);
|
||||
};
|
||||
}
|
||||
|
||||
void ChatMessageArea::setHtml(const QString& html) {
|
||||
// Create format with updated line height
|
||||
|
@ -31,7 +31,7 @@ void ChatMessageArea::setHtml(const QString& html) {
|
|||
cursor.insertHtml(html);
|
||||
cursor.setPosition(0);
|
||||
cursor.deleteChar();
|
||||
};
|
||||
}
|
||||
|
||||
void ChatMessageArea::updateLayout() {
|
||||
setFixedHeight(document()->size().height());
|
||||
|
@ -41,4 +41,4 @@ void ChatMessageArea::updateLayout() {
|
|||
void ChatMessageArea::wheelEvent(QWheelEvent* event) {
|
||||
// Capture wheel events to stop Ctrl-WheelUp/Down zooming
|
||||
event->ignore();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue