mirror-chatterino2/chatwidget.cpp
2017-01-16 18:27:51 +01:00

32 lines
567 B
C++

#include "chatwidget.h"
#include "QFont"
#include "QFontDatabase"
#include "QPainter"
#include "QVBoxLayout"
#include "colorscheme.h"
ChatWidget::ChatWidget(QWidget *parent)
: QWidget(parent)
, m_header(this)
, m_vbox(this)
{
m_vbox.setSpacing(0);
m_vbox.setMargin(1);
m_vbox.addWidget(&m_header);
m_vbox.addWidget(&m_view);
m_vbox.addWidget(&m_input);
}
ChatWidget::~ChatWidget()
{
}
void
ChatWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(rect(), ColorScheme::instance().ChatBackground);
}