diff options
author | Ken Moore <moorekou@gmail.com> | 2015-09-10 12:39:35 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-09-10 12:39:35 -0400 |
commit | 3365faa51cbd133e960d4ea6d3c6c930390c4b95 (patch) | |
tree | 4b807631ae4a45dc29e13e3deb64551fcc55d737 /libLumina/LuminaThemes.h | |
parent | Add a new panel plugin: systemstart (diff) | |
download | lumina-3365faa51cbd133e960d4ea6d3c6c930390c4b95.tar.gz lumina-3365faa51cbd133e960d4ea6d3c6c930390c4b95.tar.bz2 lumina-3365faa51cbd133e960d4ea6d3c6c930390c4b95.zip |
Add come fixes to libLumina to work with the new systemstart plugin, and adjust the theme files accordingly.
Diffstat (limited to 'libLumina/LuminaThemes.h')
-rw-r--r-- | libLumina/LuminaThemes.h | 19 |
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(); |