mirror-chatterino2/src/widgets/helper/ScrollbarHighlight.cpp
Ryan e24dffa961
Fix 'First Message' scrollbar highlights not being disabled (#3325)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2021-10-30 13:24:38 +02:00

51 lines
1.1 KiB
C++

#include "widgets/helper/ScrollbarHighlight.hpp"
#include "Application.hpp"
#include "singletons/Theme.hpp"
#include "widgets/Scrollbar.hpp"
namespace chatterino {
ScrollbarHighlight::ScrollbarHighlight()
: color_(std::make_shared<QColor>())
, style_(Style::None)
{
}
ScrollbarHighlight::ScrollbarHighlight(const std::shared_ptr<QColor> color,
Style style, bool isRedeemedHighlight,
bool isFirstMessageHighlight)
: color_(color)
, style_(style)
, isRedeemedHighlight_(isRedeemedHighlight)
, isFirstMessageHighlight_(isFirstMessageHighlight)
{
}
QColor ScrollbarHighlight::getColor() const
{
return *this->color_;
}
ScrollbarHighlight::Style ScrollbarHighlight::getStyle() const
{
return this->style_;
}
bool ScrollbarHighlight::isRedeemedHighlight() const
{
return this->isRedeemedHighlight_;
}
bool ScrollbarHighlight::isFirstMessageHighlight() const
{
return this->isFirstMessageHighlight_;
}
bool ScrollbarHighlight::isNull() const
{
return this->style_ == None;
}
} // namespace chatterino