aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/themeinterface.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-30 21:01:54 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-30 13:54:12 -0700
commit79bf243ec0055f546efa2b4dee20424f291f968d (patch)
tree2590d350fd66a53e7faac222ff4c3807b586ae22 /mobile-widgets/themeinterface.h
parent7f2eaba5743e8efe9850075ebd911347dd9b3a85 (diff)
downloadsubsurface-79bf243ec0055f546efa2b4dee20424f291f968d.tar.gz
cleanup: make members of ThemeInterface non-static
We have a singleton class ThemeInterface, which means that it is global and exists only once. It's members are static, i.e. also global. A message from the department of redundancy department? In any case, that makes no sense. Let's just make these members local to the class. I would even rip out the whole singleton thing, since the object is not accessed anywhere outside from QML. Let's keep it for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/themeinterface.h')
-rw-r--r--mobile-widgets/themeinterface.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/mobile-widgets/themeinterface.h b/mobile-widgets/themeinterface.h
index 35bb251a8..622ce5eaa 100644
--- a/mobile-widgets/themeinterface.h
+++ b/mobile-widgets/themeinterface.h
@@ -36,12 +36,12 @@ class themeInterface : public QObject {
public:
static themeInterface *instance();
- static void setup(QQmlContext *ct);
- static double currentScale();
+ void setup(QQmlContext *ct);
+ double currentScale();
public slots:
- static void set_currentTheme(const QString &theme);
- static void set_currentScale(double);
+ void set_currentTheme(const QString &theme);
+ void set_currentScale(double);
signals:
void backgroundColorChanged(QColor);
@@ -67,27 +67,27 @@ signals:
private:
themeInterface() {}
- static void update_theme();
+ void update_theme();
- static QColor m_backgroundColor;
- static QColor m_contrastAccentColor;
- static QColor m_darkerPrimaryColor;
- static QColor m_darkerPrimaryTextColor;
- static QColor m_drawerColor;
- static QColor m_lightDrawerColor;
- static QColor m_lightPrimaryColor;
- static QColor m_lightPrimaryTextColor;
- static QColor m_primaryColor;
- static QColor m_primaryTextColor;
- static QColor m_secondaryTextColor;
- static QColor m_textColor;
+ QColor m_backgroundColor;
+ QColor m_contrastAccentColor;
+ QColor m_darkerPrimaryColor;
+ QColor m_darkerPrimaryTextColor;
+ QColor m_drawerColor;
+ QColor m_lightDrawerColor;
+ QColor m_lightPrimaryColor;
+ QColor m_lightPrimaryTextColor;
+ QColor m_primaryColor;
+ QColor m_primaryTextColor;
+ QColor m_secondaryTextColor;
+ QColor m_textColor;
- static double m_basePointSize;
- static double m_headingPointSize;
- static double m_regularPointSize;
- static double m_smallPointSize;
- static double m_titlePointSize;
+ double m_basePointSize;
+ double m_headingPointSize;
+ double m_regularPointSize;
+ double m_smallPointSize;
+ double m_titlePointSize;
- static QString m_currentTheme;
+ QString m_currentTheme;
};
#endif