diff --git a/settings-daemon/theme/com.cutefish.Theme.xml b/settings-daemon/theme/com.cutefish.Theme.xml index 72449a3..b6b6eb4 100644 --- a/settings-daemon/theme/com.cutefish.Theme.xml +++ b/settings-daemon/theme/com.cutefish.Theme.xml @@ -7,6 +7,9 @@ + + + @@ -46,6 +49,7 @@ + @@ -66,6 +70,8 @@ + + diff --git a/settings-daemon/theme/thememanager.cpp b/settings-daemon/theme/thememanager.cpp index 062ae5e..96eddd7 100644 --- a/settings-daemon/theme/thememanager.cpp +++ b/settings-daemon/theme/thememanager.cpp @@ -68,6 +68,7 @@ ThemeManager::ThemeManager(QObject *parent) // init value m_isDarkMode = m_settings->value("DarkMode", false).toBool(); m_darkModeDimsWallpaer = m_settings->value("DarkModeDimsWallpaer", false).toBool(); + m_backgroundVisible = true; m_wallpaperPath = m_settings->value("Wallpaper", "/usr/share/backgrounds/cutefishos/default.jpg").toString(); m_accentColor = m_settings->value("AccentColor", 0).toInt(); m_backgroundType = m_settings->value("BackgroundType", 0).toInt(); @@ -144,6 +145,20 @@ void ThemeManager::setDarkModeDimsWallpaer(bool value) emit darkModeDimsWallpaerChanged(); } +bool ThemeManager::backgroundVisible() const +{ + return m_backgroundVisible; +} + +void ThemeManager::setBackgroundVisible(bool value) +{ + if (m_backgroundVisible == value) + return; + + m_backgroundVisible = value; + emit backgroundVisibleChanged(); +} + int ThemeManager::accentColor() { return m_settings->value("AccentColor", 0).toInt(); diff --git a/settings-daemon/theme/thememanager.h b/settings-daemon/theme/thememanager.h index 9b768aa..f5176bc 100644 --- a/settings-daemon/theme/thememanager.h +++ b/settings-daemon/theme/thememanager.h @@ -28,6 +28,7 @@ class ThemeManager : public QObject Q_OBJECT Q_PROPERTY(bool isDarkMode READ isDarkMode WRITE setDarkMode NOTIFY darkModeChanged) Q_PROPERTY(bool darkModeDimsWallpaer READ darkModeDimsWallpaer WRITE setDarkModeDimsWallpaer NOTIFY darkModeDimsWallpaerChanged) + Q_PROPERTY(bool backgroundVisible READ backgroundVisible WRITE setBackgroundVisible NOTIFY backgroundVisibleChanged) Q_PROPERTY(QString systemFont READ systemFont WRITE setSystemFont NOTIFY systemFontChanged) Q_PROPERTY(QString systemFixedFont READ systemFixedFont WRITE setSystemFixedFont) Q_PROPERTY(qreal systemFontPointSize READ systemFontPointSize WRITE setSystemFontPointSize NOTIFY systemFontPointSizeChanged) @@ -52,6 +53,8 @@ public: void setDarkModeDimsWallpaer(bool value); QString systemFont(); + bool backgroundVisible() const; + void setBackgroundVisible(bool value); void setSystemFont(const QString &fontFamily); QString systemFixedFont(); @@ -96,6 +99,7 @@ signals: void wallpaperChanged(QString path); void darkModeDimsWallpaerChanged(); void accentColorChanged(int accentColor); + void backgroundVisibleChanged(); void backgroundTypeChanged(); void backgroundColorChanged(); void cursorThemeChanged(); @@ -110,6 +114,7 @@ private: bool m_isDarkMode; bool m_darkModeDimsWallpaer; QString m_wallpaperPath; + bool m_backgroundVisible; int m_backgroundType; QString m_backgroundColor; int m_accentColor;