mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
(WIP) Removed old font changing logic for input text
All that needs doing is making it so that the input text font changes at exactly the same time as the chat messages font does, this is probably to do with focus
This commit is contained in:
parent
ad1694234d
commit
f26cfdd92b
2 changed files with 2 additions and 11 deletions
|
@ -7,7 +7,6 @@
|
|||
#include "notebookpage.hpp"
|
||||
#include "settingsmanager.hpp"
|
||||
|
||||
#include <QFont>
|
||||
#include <QCompleter>
|
||||
#include <QPainter>
|
||||
#include <boost/signals2.hpp>
|
||||
|
@ -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 *)
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "fontmanager.hpp"
|
||||
#include "resizingtextedit.hpp"
|
||||
#include "widgets/basewidget.hpp"
|
||||
#include "widgets/chatwidgetheaderbutton.hpp"
|
||||
|
||||
#include <QFont>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue