diff --git a/widgets/flashinglabel.cpp b/widgets/flashinglabel.cpp index 7f06d3d91..d9e4bfb2f 100644 --- a/widgets/flashinglabel.cpp +++ b/widgets/flashinglabel.cpp @@ -31,6 +31,7 @@ #include #include +#include using namespace Plasma; @@ -50,7 +51,7 @@ class Plasma::FlashingLabelPrivate : q(flash), defaultDuration(3000), type(FlashingLabelPrivate::Text), - color(Qt::black), + color(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor)), animId(0), state(FlashingLabelPrivate::Invisible), autohide(false) @@ -59,6 +60,7 @@ class Plasma::FlashingLabelPrivate fadeOutTimer.setSingleShot(true); fadeInTimer.setInterval(0); fadeInTimer.setSingleShot(true); + QObject::connect(Theme::defaultTheme(), SIGNAL(themeChanged()), q, SLOT(setPalette())); } ~FlashingLabelPrivate() { } @@ -66,6 +68,7 @@ class Plasma::FlashingLabelPrivate void renderPixmap(const QSize &size); void setupFlash(int duration); void elementAnimationFinished(int); + void setPalette(); FlashingLabel *q; int defaultDuration; @@ -300,4 +303,10 @@ void FlashingLabelPrivate::elementAnimationFinished(int id) } } +void FlashingLabelPrivate::setPalette() +{ + color = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor); + q->update(); +} + #include "flashinglabel.moc" diff --git a/widgets/flashinglabel.h b/widgets/flashinglabel.h index ee518b372..41584abff 100644 --- a/widgets/flashinglabel.h +++ b/widgets/flashinglabel.h @@ -79,6 +79,7 @@ protected Q_SLOTS: private: Q_PRIVATE_SLOT(d, void elementAnimationFinished(int)) + Q_PRIVATE_SLOT(d, void setPalette()) FlashingLabelPrivate *const d; };