1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

redo layout on Settings::emojiFontChanged

This commit is contained in:
krepa098 2015-02-15 11:43:01 +01:00
parent 205f950073
commit 2bc7594049
4 changed files with 8 additions and 3 deletions

View File

@ -611,6 +611,11 @@ void ChatLog::selectAll()
updateMultiSelectionRect(); updateMultiSelectionRect();
} }
void ChatLog::forceRelayout()
{
startResizeWorker();
}
void ChatLog::checkVisibility() void ChatLog::checkVisibility()
{ {
if(lines.empty()) if(lines.empty())

View File

@ -49,6 +49,7 @@ public:
void setTypingNotificationVisible(bool visible); void setTypingNotificationVisible(bool visible);
void scrollToLine(ChatLine::Ptr line); void scrollToLine(ChatLine::Ptr line);
void selectAll(); void selectAll();
void forceRelayout();
QString getSelectedText() const; QString getSelectedText() const;

View File

@ -53,9 +53,6 @@ void Text::setText(const QString& txt)
void Text::setWidth(qreal w) void Text::setWidth(qreal w)
{ {
if(w == width)
return;
width = w; width = w;
dirty = true; dirty = true;

View File

@ -65,6 +65,8 @@ GenericChatForm::GenericChatForm(QWidget *parent)
chatWidget = new ChatLog(this); chatWidget = new ChatLog(this);
chatWidget->setBusyNotification(ChatMessage::createBusyNotification()); chatWidget->setBusyNotification(ChatMessage::createBusyNotification());
connect(&Settings::getInstance(), &Settings::emojiFontChanged, this, [this]() { chatWidget->forceRelayout(); });
msgEdit = new ChatTextEdit(); msgEdit = new ChatTextEdit();
sendButton = new QPushButton(); sendButton = new QPushButton();