diff --git a/src/widgets/chatwidgetinput.cpp b/src/widgets/chatwidgetinput.cpp index cb68b7e31..202403021 100644 --- a/src/widgets/chatwidgetinput.cpp +++ b/src/widgets/chatwidgetinput.cpp @@ -7,7 +7,6 @@ #include "notebookpage.hpp" #include "settingsmanager.hpp" -#include #include #include #include @@ -166,11 +165,6 @@ ChatWidgetInput::~ChatWidgetInput() */ } -QFont &ChatWidgetInput::getFont() const -{ - return FontManager::getInstance().getFont(_font); -} - void ChatWidgetInput::refreshTheme() { QPalette palette; @@ -180,7 +174,6 @@ void ChatWidgetInput::refreshTheme() this->textLengthLabel.setPalette(palette); this->textInput.setStyleSheet(this->colorScheme.InputStyleSheet); - this->textInput.setFont(this->getFont()); } void ChatWidgetInput::editTextChanged() @@ -204,6 +197,8 @@ void ChatWidgetInput::paintEvent(QPaintEvent *) painter.fillRect(this->rect(), this->colorScheme.ChatInputBackground); painter.setPen(this->colorScheme.ChatInputBorder); painter.drawRect(0, 0, this->width() - 1, this->height() - 1); + + this->textInput.setFont(textInput.getFont()); } void ChatWidgetInput::resizeEvent(QResizeEvent *) diff --git a/src/widgets/chatwidgetinput.hpp b/src/widgets/chatwidgetinput.hpp index 76be1f50f..a0fdc09bf 100644 --- a/src/widgets/chatwidgetinput.hpp +++ b/src/widgets/chatwidgetinput.hpp @@ -1,11 +1,9 @@ #pragma once -#include "fontmanager.hpp" #include "resizingtextedit.hpp" #include "widgets/basewidget.hpp" #include "widgets/chatwidgetheaderbutton.hpp" -#include #include #include #include @@ -42,8 +40,6 @@ 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;