From 75079d5ac86066a9259d3dd967d45ba0a05eb4f1 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Fri, 27 Oct 2017 21:04:27 +0200 Subject: [PATCH] Also update chat widget input text when the font is updated. Fixes #93 --- src/widgets/chatwidgetinput.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/chatwidgetinput.cpp b/src/widgets/chatwidgetinput.cpp index 2ee219124..cf56aae62 100644 --- a/src/widgets/chatwidgetinput.cpp +++ b/src/widgets/chatwidgetinput.cpp @@ -30,7 +30,12 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget, EmoteManager &emoteMan this->hbox.addLayout(&this->editContainer); 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.setMargin(4);