mirror-chatterino2/chatwidget.cpp

31 lines
528 B
C++
Raw Normal View History

2016-12-29 17:31:07 +01:00
#include "chatwidget.h"
#include "QFont"
#include "QFontDatabase"
2017-01-11 18:52:09 +01:00
#include "QPainter"
2017-01-01 02:30:42 +01:00
#include "QVBoxLayout"
#include "colorscheme.h"
2016-12-29 17:31:07 +01:00
ChatWidget::ChatWidget(QWidget *parent)
2017-01-11 18:52:09 +01:00
: QWidget(parent)
, vbox(this)
2016-12-29 17:31:07 +01:00
{
2017-01-01 02:30:42 +01:00
vbox.setSpacing(0);
vbox.setMargin(1);
vbox.addWidget(&header);
vbox.addWidget(&view);
vbox.addWidget(&input);
}
ChatWidget::~ChatWidget()
{
2016-12-29 17:31:07 +01:00
}
2017-01-11 18:52:09 +01:00
void
ChatWidget::paintEvent(QPaintEvent *)
2016-12-29 17:31:07 +01:00
{
2017-01-11 18:52:09 +01:00
QPainter painter(this);
2016-12-29 17:31:07 +01:00
2017-01-06 23:28:48 +01:00
painter.fillRect(rect(), ColorScheme::instance().ChatBackground);
2016-12-29 17:31:07 +01:00
}