forked from notmart/mycroft-embedded-shell
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef KIRIGAMIPLASMAFACTORY_H | ||
#define KIRIGAMIPLASMAFACTORY_H | ||
|
||
#include <Kirigami2/KirigamiPluginFactory> | ||
#include <QObject> | ||
#include <QPluginLoader> | ||
|
||
class OpenVoiceStyleFactory : public Kirigami::KirigamiPluginFactory | ||
{ | ||
Q_OBJECT | ||
Q_PLUGIN_METADATA(IID "org.ovos.KirigamiPluginFactory") | ||
Q_INTERFACES(Kirigami::KirigamiPluginFactory) | ||
|
||
public: | ||
explicit OpenVoiceStyleFactory(QObject *parent = nullptr); | ||
~OpenVoiceStyleFactory() override; | ||
|
||
Kirigami::PlatformTheme *createPlatformTheme(QObject *parent) override; | ||
}; | ||
|
||
#endif // KIRIGAMIPLASMAFACTORY_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef OVOSTHEME_H | ||
#define OVOSTHEME_H | ||
|
||
#include <Kirigami/KirigamiPluginFactory> | ||
#include <Kirigami/PlatformTheme> | ||
|
||
#include <QObject> | ||
#include <QFileSystemWatcher> | ||
|
||
class OvosTheme : public Kirigami::PlatformTheme | ||
{ | ||
Q_OBJECT | ||
QPalette lightPalette; | ||
|
||
public: | ||
explicit OvosTheme(QObject *parent = nullptr); | ||
void syncColors(); | ||
void syncWindow(); | ||
void readConfig(); | ||
void syncConfigChanges(); | ||
void setupFileWatch(); | ||
|
||
protected: | ||
bool event(QEvent *event) override; | ||
|
||
private: | ||
QColor m_primaryColor; | ||
QColor m_secondaryColor; | ||
QColor m_textColor; | ||
QPointer<QWindow> m_window; | ||
|
||
QFileSystemWatcher *m_fileWatcher; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters