mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
a3e3a30b70
commit
2cc215d3f2
4 changed files with 59 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue