mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 22:28:48 +02:00
Update chat textbox to use correct line height
This commit is contained in:
parent
8aee81ae7c
commit
bfb879d3e6
1 changed files with 13 additions and 1 deletions
|
@ -48,6 +48,18 @@ ChatWindow::ChatWindow(QWidget* parent) :
|
|||
ui->messagesGridLayout->setColumnStretch(1, 3);
|
||||
|
||||
ui->messagePlainTextEdit->installEventFilter(this);
|
||||
ui->messagePlainTextEdit->setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
|
||||
|
||||
QTextCursor cursor(ui->messagePlainTextEdit->textCursor());
|
||||
|
||||
cursor.movePosition(QTextCursor::Start);
|
||||
|
||||
QTextBlockFormat format = cursor.blockFormat();
|
||||
format.setLineHeight(130, QTextBlockFormat::ProportionalHeight);
|
||||
|
||||
cursor.setBlockFormat(format);
|
||||
|
||||
ui->messagePlainTextEdit->setTextCursor(cursor);
|
||||
|
||||
if (!AccountManager::getInstance().isLoggedIn()) {
|
||||
ui->connectingToXMPPLabel->setText(tr("You must be logged in to chat with others."));
|
||||
|
|
Loading…
Reference in a new issue