mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5a7ebe15a5
commit
906cce9e88
2 changed files with 15 additions and 1 deletions
|
@ -107,4 +107,17 @@ void themeInterface::update_theme()
|
||||||
m_textColor = m_darkTextColor;
|
m_textColor = m_darkTextColor;
|
||||||
m_iconStyle = ":/icons-dark";
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class themeInterface : public QObject {
|
||||||
|
|
||||||
// Support
|
// Support
|
||||||
Q_PROPERTY(QString currentTheme MEMBER m_currentTheme WRITE set_currentTheme NOTIFY currentThemeChanged)
|
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
|
// Compatibility existing code
|
||||||
Q_PROPERTY(QColor blueBackgroundColor MEMBER m_blueBackgroundColor CONSTANT)
|
Q_PROPERTY(QColor blueBackgroundColor MEMBER m_blueBackgroundColor CONSTANT)
|
||||||
|
@ -107,6 +107,7 @@ signals:
|
||||||
void currentScaleChanged(double);
|
void currentScaleChanged(double);
|
||||||
|
|
||||||
void currentThemeChanged(const QString &);
|
void currentThemeChanged(const QString &);
|
||||||
|
void iconStyleChanged(const QString &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
themeInterface() {}
|
themeInterface() {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue