5957551d06
* Support for user-defined sounds and colors * Make color & sound columns selectable * Add custom row for subscription highlights * Add subscriptions to custom highlights and centrally manage highlight colors * Dynamically update message highlight colors
24 lines
456 B
C++
24 lines
456 B
C++
#include "widgets/helper/ColorButton.hpp"
|
|
|
|
namespace chatterino {
|
|
|
|
ColorButton::ColorButton(const QColor &color, QWidget *parent)
|
|
: QPushButton(parent)
|
|
, color_(color)
|
|
{
|
|
this->setColor(color_);
|
|
}
|
|
|
|
const QColor &ColorButton::color() const
|
|
{
|
|
return this->color_;
|
|
}
|
|
|
|
void ColorButton::setColor(QColor color)
|
|
{
|
|
this->color_ = color;
|
|
this->setStyleSheet("background-color: " + color.name(QColor::HexArgb));
|
|
}
|
|
|
|
} // namespace chatterino
|