summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorMax Sandholm <max@sandholm.org>2017-11-16 16:33:52 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-11-16 16:33:52 +0200
commit19b526d4533841ca91209929f0d6aef6042a8eeb (patch)
tree596400e11b6275a961b9d57b02b0c0b502df38c4 /include/ui
parent21fdb26bd47102c87c826c6194f55933a717c970 (diff)
Use system color scheme (using a Qt stylesheet) #104
The color scheme of nheko obeys the default color theme of Qt (i.e. the system theme). It uses a Qt stylesheet to accomplish this, which means replacing the color theme with a custom theme would only be a matter of writing a new style sheet and loading it into the app.
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/LoadingIndicator.h1
-rw-r--r--include/ui/OverlayWidget.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/ui/LoadingIndicator.h b/include/ui/LoadingIndicator.h
index 75920dd8..bb33fe6c 100644
--- a/include/ui/LoadingIndicator.h
+++ b/include/ui/LoadingIndicator.h
@@ -9,6 +9,7 @@
class LoadingIndicator : public QWidget
{
Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor)
public:
LoadingIndicator(QWidget *parent = 0);
diff --git a/include/ui/OverlayWidget.h b/include/ui/OverlayWidget.h
index 2984e469..6662479d 100644
--- a/include/ui/OverlayWidget.h
+++ b/include/ui/OverlayWidget.h
@@ -1,6 +1,8 @@
#pragma once
#include <QEvent>
+#include <QPainter>
+#include <QStyleOption>
#include <QWidget>
class OverlayWidget : public QWidget
@@ -15,4 +17,5 @@ protected:
bool eventFilter(QObject *obj, QEvent *event) override;
QRect overlayGeometry() const;
+ void paintEvent(QPaintEvent *event) override;
};