Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dorian Zedler 2020-08-09 13:30:06 +02:00
commit 5275acd0e4
Signed by: dorian
GPG key ID: D3B255CB8BC7CD37
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@ class ScStwAppThemeManager : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(ScStwAppTheme* theme READ getTheme NOTIFY themeChanged) Q_PROPERTY(ScStwAppTheme* theme READ getTheme NOTIFY themeChanged)
Q_PROPERTY(QString themeName READ getThemeName WRITE setTheme NOTIFY themeChanged)
public: public:
explicit ScStwAppThemeManager(QObject *parent = nullptr); explicit ScStwAppThemeManager(QObject *parent = nullptr);
@ -45,6 +46,7 @@ signals:
public slots: public slots:
ScStwAppTheme* getTheme(); ScStwAppTheme* getTheme();
Q_INVOKABLE bool setTheme(QString themeName); Q_INVOKABLE bool setTheme(QString themeName);
Q_INVOKABLE QString getThemeName();
}; };

View file

@ -174,3 +174,7 @@ QString ScStwAppThemeManager::lighter(QString color, double factor) {
qcolor.setHsv(h,s,v * factor); qcolor.setHsv(h,s,v * factor);
return qcolor.name(); return qcolor.name();
} }
QString ScStwAppThemeManager::getThemeName() {
return this->currentTheme->getName();
}