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
+9 -37
View File
@@ -3,51 +3,23 @@
#include "QString"
namespace chatterino {
namespace singletons {
class ThemeManager;
}
namespace widgets {
class ScrollBar;
class ScrollBarHighlight
class ScrollbarHighlight
{
public:
enum Style { Default, Left, Right, SingleLine };
enum Style : char { None, Default, Line };
enum Color : char { Highlight };
ScrollBarHighlight(double _position, int _colorIndex, ScrollBar *parent, Style _style = Default,
QString _tag = "");
ScrollbarHighlight();
ScrollbarHighlight(Color _color, Style _style = Default);
singletons::ThemeManager &themeManager;
double getPosition()
{
return this->position;
}
int getColorIndex()
{
return this->colorIndex;
}
Style getStyle()
{
return this->style;
}
QString getTag()
{
return this->tag;
}
ScrollBarHighlight *next = nullptr;
Color getColor() const;
Style getStyle() const;
bool isNull() const;
private:
double position;
int colorIndex;
Color color;
Style style;
QString tag;
};
} // namespace widgets