added highlights to the scrollbar

This commit is contained in:
fourtf
2018-01-06 03:48:56 +01:00
parent 99f2d0dd27
commit 20eab57db5
10 changed files with 159 additions and 134 deletions
+24 -8
View File
@@ -5,16 +5,32 @@
namespace chatterino {
namespace widgets {
ScrollBarHighlight::ScrollBarHighlight(double _position, int _colorIndex, ScrollBar *parent,
Style _style, QString _tag)
: themeManager(parent->themeManager)
, position(_position)
// , colorIndex(std::max(0, std::min(this->themeManager.HighlightColorCount, _colorIndex)))
, colorIndex(0)
, style(_style)
, tag(_tag)
ScrollbarHighlight::ScrollbarHighlight()
: color(Color::Highlight)
, style(Style::None)
{
}
ScrollbarHighlight::ScrollbarHighlight(Color _color, Style _style)
: color(_color)
, style(_style)
{
}
ScrollbarHighlight::Color ScrollbarHighlight::getColor() const
{
return this->color;
}
ScrollbarHighlight::Style ScrollbarHighlight::getStyle() const
{
return this->style;
}
bool ScrollbarHighlight::isNull() const
{
return this->style == None;
}
} // namespace widgets
} // namespace chatterino