aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaThemes.h
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina/LuminaThemes.h')
-rw-r--r--libLumina/LuminaThemes.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libLumina/LuminaThemes.h b/libLumina/LuminaThemes.h
index 6dcff89d..4ded0527 100644
--- a/libLumina/LuminaThemes.h
+++ b/libLumina/LuminaThemes.h
@@ -18,6 +18,8 @@
#include <QDir>
#include <QTimer>
#include <QDateTime>
+#include <QStyle>
+#include <QProxyStyle>
class LTHEME{
public:
@@ -55,6 +57,22 @@ public:
};
+// Qt Style override to allow custom themeing/colors
+class LuminaThemeStyle : public QProxyStyle{
+ Q_OBJECT
+private:
+ bool darkfont;
+
+public:
+ LuminaThemeStyle();
+ ~LuminaThemeStyle();
+
+ //Function to update the style (for use by the theme engine)
+ void update();
+ //Subclassed functions
+ void drawItemText(QPainter*, const QRect&, int, const QPalette&, bool, const QString&, QPalette::ColorRole) const;
+
+};
//Simple class to setup a utility to use the Lumina theme
//-----Example usage in "main.cpp" -------------------------------
@@ -80,6 +98,7 @@ private:
QString theme,colors,icons, font, fontsize, cursors; //current settings
QTimer *syncTimer;
QDateTime lastcheck;
+ LuminaThemeStyle *style;
private slots:
void watcherChange();
bgstack15