1 files changed, 12 insertions, 0 deletions
diff --git a/include/ui/ScrollBar.h b/include/ui/ScrollBar.h
index 1c056409..fe8ba64a 100644
--- a/include/ui/ScrollBar.h
+++ b/include/ui/ScrollBar.h
@@ -26,12 +26,21 @@
class ScrollBar : public QScrollBar
{
Q_OBJECT
+ Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
+ Q_PROPERTY(QColor handleColor READ handleColor WRITE setHandleColor)
+
public:
ScrollBar(QScrollArea *area, QWidget *parent = nullptr);
void fadeIn();
void fadeOut();
+ QColor backgroundColor() const { return bgColor_; }
+ void setBackgroundColor(QColor &color) { bgColor_ = color; }
+
+ QColor handleColor() const { return handleColor_; }
+ void setHandleColor(QColor &color) { handleColor_ = color; }
+
protected:
void paintEvent(QPaintEvent *e) override;
void sliderChange(SliderChange change) override;
@@ -50,4 +59,7 @@ private:
QScrollArea *area_;
QRect handle_;
+
+ QColor bgColor_ = QColor(33, 33, 33, 30);
+ QColor handleColor_ = QColor(0, 0, 0, 80);
};
|