summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-15 09:55:00 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-30 07:53:34 +0200
commit906cce9e88453332806b8d5b620eb9c5a78a99f0 (patch)
treeaf404886f75e317800b06af1b8286fc5ce22fa8f
parent5a7ebe15a5bd278c581038d1e38e7a5f589c2edc (diff)
downloadsubsurface-906cce9e88453332806b8d5b620eb9c5a78a99f0.tar.gz
mobile-widgets: emit signals for each color
Emit signals for each standard color when theme changes. The iconStyle property was changed from being a constant, because it can change, and thus a signal was added. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/themeinterface.cpp13
-rw-r--r--mobile-widgets/themeinterface.h3
2 files changed, 15 insertions, 1 deletions
diff --git a/mobile-widgets/themeinterface.cpp b/mobile-widgets/themeinterface.cpp
index 21c189618..edb998922 100644
--- a/mobile-widgets/themeinterface.cpp
+++ b/mobile-widgets/themeinterface.cpp
@@ -107,4 +107,17 @@ void themeInterface::update_theme()
m_textColor = m_darkTextColor;
m_iconStyle = ":/icons-dark";
}
+ emit backgroundColorChanged(m_backgroundColor);
+ emit contrastAccentColorChanged(m_contrastAccentColor);
+ emit darkerPrimaryColorChanged(m_darkerPrimaryColor);
+ emit darkerPrimaryTextColorChanged(m_darkerPrimaryTextColor);
+ emit drawerColorChanged(m_drawerColor);
+ emit lightDrawerColorChanged(m_lightDrawerColor);
+ emit lightPrimaryColorChanged(m_lightPrimaryColor);
+ emit lightPrimaryTextColorChanged(m_lightPrimaryTextColor);
+ emit primaryColorChanged(m_primaryColor);
+ emit primaryTextColorChanged(m_primaryTextColor);
+ emit secondaryTextColorChanged(m_secondaryTextColor);
+ emit textColorChanged(m_textColor);
+ emit iconStyleChanged(m_iconStyle);
}
diff --git a/mobile-widgets/themeinterface.h b/mobile-widgets/themeinterface.h
index f06d834da..7ef26d7f9 100644
--- a/mobile-widgets/themeinterface.h
+++ b/mobile-widgets/themeinterface.h
@@ -33,7 +33,7 @@ class themeInterface : public QObject {
// Support
Q_PROPERTY(QString currentTheme MEMBER m_currentTheme WRITE set_currentTheme NOTIFY currentThemeChanged)
- Q_PROPERTY(QString iconStyle MEMBER m_iconStyle CONSTANT)
+ Q_PROPERTY(QString iconStyle MEMBER m_iconStyle NOTIFY iconStyleChanged)
// Compatibility existing code
Q_PROPERTY(QColor blueBackgroundColor MEMBER m_blueBackgroundColor CONSTANT)
@@ -107,6 +107,7 @@ signals:
void currentScaleChanged(double);
void currentThemeChanged(const QString &);
+ void iconStyleChanged(const QString &);
private:
themeInterface() {}