Skip to content

Commit

Permalink
FIX(client): Chatbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmnt committed Sep 30, 2024
1 parent 0a033af commit 22aea7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mumble/CustomElements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,18 @@ void ChatbarTextEdit::dropEvent(QDropEvent *evt) {
}
}

#include <QDebug>

ChatbarTextEdit::ChatbarTextEdit(QWidget *p) : QTextEdit(p), iHistoryIndex(-1) {
setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
setMinimumHeight(0);
connect(this, SIGNAL(textChanged()), SLOT(doResize()));
connect(this, &ChatbarTextEdit::textChanged, this, &ChatbarTextEdit::doResize);

const int chatBarTextHeight = QFontMetrics(font()).height();
qDebug() << "chat bar text height " << chatBarTextHeight;
setMaximumHeight(chatBarTextHeight * 5);

bDefaultVisible = true;
setDefaultText(tr("<center>Type chat message here</center>"));
Expand Down
1 change: 1 addition & 0 deletions src/mumble/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ void MainWindow::setupGui() {
qteChat->setDefaultText(tr("<center>Not connected</center>"), true);
qteChat->setEnabled(false);


QWidget *dummyTitlebar = new QWidget(qdwMinimalViewNote);
qdwMinimalViewNote->setTitleBarWidget(dummyTitlebar);

Expand Down

0 comments on commit 22aea7e

Please sign in to comment.