Also update chat widget input text when the font is updated.

Fixes #93
This commit is contained in:
Rasmus Karlsson 2017-10-27 21:04:27 +02:00
parent c08059c6a8
commit 75079d5ac8

View file

@ -30,7 +30,12 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget, EmoteManager &emoteMan
this->hbox.addLayout(&this->editContainer); this->hbox.addLayout(&this->editContainer);
this->hbox.addLayout(&this->vbox); this->hbox.addLayout(&this->vbox);
this->textInput.setFont(FontManager::getInstance().getFont(FontManager::Type::Medium)); auto &fontManager = FontManager::getInstance();
this->textInput.setFont(fontManager.getFont(FontManager::Type::Medium));
fontManager.fontChanged.connect([this, &fontManager]() {
this->textInput.setFont(fontManager.getFont(FontManager::Type::Medium));
});
this->editContainer.addWidget(&this->textInput); this->editContainer.addWidget(&this->textInput);
this->editContainer.setMargin(4); this->editContainer.setMargin(4);