use plasma colours by default for the text
svn path=/trunk/KDE/kdelibs/; revision=1053269
This commit is contained in:
parent
f97924aee3
commit
3ad39b384c
@ -31,6 +31,7 @@
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <plasma/animator.h>
|
||||
#include <plasma/theme.h>
|
||||
|
||||
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"
|
||||
|
@ -79,6 +79,7 @@ protected Q_SLOTS:
|
||||
|
||||
private:
|
||||
Q_PRIVATE_SLOT(d, void elementAnimationFinished(int))
|
||||
Q_PRIVATE_SLOT(d, void setPalette())
|
||||
FlashingLabelPrivate *const d;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user