summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/themeinterface.h
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-14 19:30:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-30 07:52:14 +0200
commit2cc215d3f26788974b1d5c552cb3750ad6bf8d85 (patch)
tree7e49e4fa1cfaa9db7c609f4131f9b5f2d1816ea6 /mobile-widgets/themeinterface.h
parenta3e3a30b701370ec8e35f5cb3d1072642a2f44b1 (diff)
downloadsubsurface-2cc215d3f26788974b1d5c552cb3750ad6bf8d85.tar.gz
mobile-widgets: move font property to themeInterface
Move setting of font properties used throughout to themeInterface. Add new settings "currentScale". The properties are kept in main (subsurfaceTheme) in order not to do a big search/replace. Update settings to use currectScale and signal changes in themeinterface. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/themeinterface.h')
-rw-r--r--mobile-widgets/themeinterface.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mobile-widgets/themeinterface.h b/mobile-widgets/themeinterface.h
index ee6a8879c..f06d834da 100644
--- a/mobile-widgets/themeinterface.h
+++ b/mobile-widgets/themeinterface.h
@@ -25,6 +25,11 @@ class themeInterface : public QObject {
// Font
Q_PROPERTY(double basePointSize MEMBER m_basePointSize CONSTANT)
+ Q_PROPERTY(double headingPointSize MEMBER m_headingPointSize NOTIFY headingPointSizeChanged)
+ Q_PROPERTY(double regularPointSize MEMBER m_regularPointSize NOTIFY regularPointSizeChanged)
+ Q_PROPERTY(double smallPointSize MEMBER m_smallPointSize NOTIFY smallPointSizeChanged)
+ Q_PROPERTY(double titlePointSize MEMBER m_titlePointSize NOTIFY titlePointSizeChanged)
+ Q_PROPERTY(double currentScale READ currentScale WRITE set_currentScale NOTIFY currentScaleChanged)
// Support
Q_PROPERTY(QString currentTheme MEMBER m_currentTheme WRITE set_currentTheme NOTIFY currentThemeChanged)
@@ -78,6 +83,9 @@ public:
public slots:
void set_currentTheme(const QString &theme);
+ double currentScale();
+ void set_currentScale(double);
+
signals:
void backgroundColorChanged(QColor);
void contrastAccentColorChanged(QColor);
@@ -92,6 +100,12 @@ signals:
void secondaryTextColorChanged(QColor);
void textColorChanged(QColor);
+ void headingPointSizeChanged(double);
+ void regularPointSizeChanged(double);
+ void smallPointSizeChanged(double);
+ void titlePointSizeChanged(double);
+ void currentScaleChanged(double);
+
void currentThemeChanged(const QString &);
private:
@@ -112,6 +126,10 @@ private:
QColor m_textColor;
double m_basePointSize;
+ double m_headingPointSize;
+ double m_regularPointSize;
+ double m_smallPointSize;
+ double m_titlePointSize;
QString m_currentTheme;
QString m_iconStyle;