Do not blur behind EffectFrames with no style

This commit is contained in:
Martin Gräßlin 2011-04-27 14:48:34 +02:00
parent c0570a660b
commit d647950ff0
3 changed files with 7 additions and 2 deletions

View file

@ -345,7 +345,7 @@ public:
virtual void setPosition(const QPoint& point);
virtual const QString& text() const;
virtual void setText(const QString& text);
EffectFrameStyle style() const {
virtual EffectFrameStyle style() const {
return m_style;
};
Plasma::FrameSvg& frame() {

View file

@ -241,7 +241,7 @@ void BlurEffect::paintEffectFrame(EffectFrame *frame, QRegion region, double opa
const QRect screen(0, 0, displayWidth(), displayHeight());
bool valid = target->valid() && shader->isValid();
QRegion shape = frame->geometry().adjusted(-5, -5, 5, 5) & screen;
if (valid && !shape.isEmpty() && region.intersects(shape.boundingRect())) {
if (valid && !shape.isEmpty() && region.intersects(shape.boundingRect()) && frame->style() != EffectFrameNone) {
doBlur(shape, screen, opacity * frameOpacity);
}
effects->paintEffectFrame(frame, region, opacity, frameOpacity);

View file

@ -1792,6 +1792,11 @@ public:
**/
virtual GLShader* shader() const = 0;
/**
* @returns The style of this EffectFrame.
**/
virtual EffectFrameStyle style() const = 0;
/**
* If @p enable is @c true cross fading between icons and text is enabled
* By default disabled. Use setCrossFadeProgress to cross fade.