mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 04:38:57 +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,11 +48,23 @@ ChatWindow::ChatWindow(QWidget* parent) :
|
||||||
ui->messagesGridLayout->setColumnStretch(1, 3);
|
ui->messagesGridLayout->setColumnStretch(1, 3);
|
||||||
|
|
||||||
ui->messagePlainTextEdit->installEventFilter(this);
|
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()) {
|
if (!AccountManager::getInstance().isLoggedIn()) {
|
||||||
ui->connectingToXMPPLabel->setText(tr("You must be logged in to chat with others."));
|
ui->connectingToXMPPLabel->setText(tr("You must be logged in to chat with others."));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_QXMPP
|
#ifdef HAVE_QXMPP
|
||||||
const QXmppClient& xmppClient = XmppClient::getInstance().getXMPPClient();
|
const QXmppClient& xmppClient = XmppClient::getInstance().getXMPPClient();
|
||||||
if (xmppClient.isConnected()) {
|
if (xmppClient.isConnected()) {
|
||||||
|
|
Loading…
Reference in a new issue