mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
34 lines
738 B
C++
34 lines
738 B
C++
#include "MessageColor.hpp"
|
|
|
|
namespace chatterino {
|
|
|
|
MessageColor::MessageColor(const QColor &_color)
|
|
: type(Type::Custom)
|
|
, customColor(_color)
|
|
{
|
|
}
|
|
|
|
MessageColor::MessageColor(Type _type)
|
|
: type(_type)
|
|
{
|
|
}
|
|
|
|
const QColor &MessageColor::getColor(singletons::ThemeManager &themeManager) const
|
|
{
|
|
switch (this->type) {
|
|
case Type::Custom:
|
|
return this->customColor;
|
|
case Type::Text:
|
|
return themeManager.messages.textColors.regular;
|
|
case Type::System:
|
|
return themeManager.messages.textColors.system;
|
|
case Type::Link:
|
|
return themeManager.messages.textColors.link;
|
|
}
|
|
|
|
static QColor _default;
|
|
return _default;
|
|
}
|
|
|
|
} // namespace chatterino
|