diff --git a/src/widgets/chatwidgetinput.cpp b/src/widgets/chatwidgetinput.cpp index 075e7f3d3..cb68b7e31 100644 --- a/src/widgets/chatwidgetinput.cpp +++ b/src/widgets/chatwidgetinput.cpp @@ -7,6 +7,7 @@ #include "notebookpage.hpp" #include "settingsmanager.hpp" +#include #include #include #include @@ -165,6 +166,11 @@ ChatWidgetInput::~ChatWidgetInput() */ } +QFont &ChatWidgetInput::getFont() const +{ + return FontManager::getInstance().getFont(_font); +} + void ChatWidgetInput::refreshTheme() { QPalette palette; @@ -174,6 +180,7 @@ void ChatWidgetInput::refreshTheme() this->textLengthLabel.setPalette(palette); this->textInput.setStyleSheet(this->colorScheme.InputStyleSheet); + this->textInput.setFont(this->getFont()); } void ChatWidgetInput::editTextChanged() diff --git a/src/widgets/chatwidgetinput.hpp b/src/widgets/chatwidgetinput.hpp index a0fdc09bf..76be1f50f 100644 --- a/src/widgets/chatwidgetinput.hpp +++ b/src/widgets/chatwidgetinput.hpp @@ -1,9 +1,11 @@ #pragma once +#include "fontmanager.hpp" #include "resizingtextedit.hpp" #include "widgets/basewidget.hpp" #include "widgets/chatwidgetheaderbutton.hpp" +#include #include #include #include @@ -40,6 +42,8 @@ private: ResizingTextEdit textInput; QLabel textLengthLabel; ChatWidgetHeaderButton emotesLabel; + FontManager::Type _font = FontManager::Small; + QFont &getFont() const; QStringList prevMsg; unsigned int prevIndex = 0; virtual void refreshTheme() override;