diff --git a/theme.cpp b/theme.cpp index 030861882..f6a59ccd1 100644 --- a/theme.cpp +++ b/theme.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "plasma/packages_p.h" @@ -149,6 +150,11 @@ void Theme::compositingChanged() #endif } +void Theme::colorsChanged() +{ + emit changed(); +} + void Theme::setThemeName(const QString &themeName) { QString theme = themeName; @@ -179,8 +185,10 @@ void Theme::setThemeName(const QString &themeName) QString colorsFile = KStandardDirs::locate("data", "desktoptheme/" + theme + "/colors"); //kDebug() << "we're going for..." << colorsFile << "*******************"; + disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(colorsChanged())); if (colorsFile.isEmpty()) { d->colors = 0; + connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(colorsChanged())); } else { d->colors = KSharedConfig::openConfig(colorsFile); } diff --git a/theme.h b/theme.h index f714ab96e..39d76f4ee 100644 --- a/theme.h +++ b/theme.h @@ -146,6 +146,7 @@ class PLASMA_EXPORT Theme : public QObject private Q_SLOTS: void compositingChanged(); + void colorsChanged(); private: class Private;