mirror-chatterino2/src/widgets/helper/ScrollbarHighlight.cpp

44 lines
897 B
C++
Raw Normal View History

2018-06-26 14:09:39 +02:00
#include "widgets/helper/ScrollbarHighlight.hpp"
#include "Application.hpp"
2018-06-28 20:03:04 +02:00
#include "singletons/Theme.hpp"
2018-06-26 14:09:39 +02:00
#include "widgets/Scrollbar.hpp"
2017-01-03 21:19:33 +01:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
2017-01-18 21:30:23 +01:00
2018-01-06 03:48:56 +01:00
ScrollbarHighlight::ScrollbarHighlight()
: color_(std::make_shared<QColor>())
2018-07-06 19:23:47 +02:00
, style_(Style::None)
2018-01-06 03:48:56 +01:00
{
}
ScrollbarHighlight::ScrollbarHighlight(const std::shared_ptr<QColor> color,
Style style, bool isRedeemedHighlight)
2018-07-06 19:23:47 +02:00
: color_(color)
, style_(style)
, isRedeemedHighlight_(isRedeemedHighlight)
2017-01-03 21:19:33 +01:00
{
}
2017-05-27 16:16:39 +02:00
QColor ScrollbarHighlight::getColor() const
2018-01-06 03:48:56 +01:00
{
return *this->color_;
2018-01-06 03:48:56 +01:00
}
ScrollbarHighlight::Style ScrollbarHighlight::getStyle() const
{
2018-07-06 19:23:47 +02:00
return this->style_;
2018-01-06 03:48:56 +01:00
}
bool ScrollbarHighlight::isRedeemedHighlight() const
{
return this->isRedeemedHighlight_;
}
2018-01-06 03:48:56 +01:00
bool ScrollbarHighlight::isNull() const
{
2018-07-06 19:23:47 +02:00
return this->style_ == None;
2018-01-06 03:48:56 +01:00
}
2017-05-27 16:16:39 +02:00
} // namespace chatterino