* don't try to generate backgrounds when the prefix is not present in framesvg

* use the correct currentPixmap (vs m_currentpixmap) in pixmaptransition.
those two fix the focus rect hover animation

svn path=/trunk/KDE/kdelibs/; revision=1192741
This commit is contained in:
Marco Martin 2010-11-03 21:55:50 +00:00
parent e7f27c4e79
commit 714578ecc3
2 changed files with 3 additions and 3 deletions

View File

@ -114,12 +114,12 @@ QPixmap PixmapTransition::currentPixmap() const
} else if (m_targetPixmap.isNull()) {
currentPixmap = alignedStartPixmap();
if (qFuzzyCompare(delta, qreal(1.0))) {
return currentPixmap;
return m_currentPixmap;
}
//kDebug() << "painting" << m_startPixmap.rect() << "into" << m_targetRect << "in size" << currentPixmap.size();
QPainter p(&currentPixmap);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
p.fillRect(m_currentPixmap.rect(), QColor(0, 0, 0, (int)(254 - ((qreal)254)*delta)));
p.fillRect(currentPixmap.rect(), QColor(0, 0, 0, (int)(254 - ((qreal)254)*delta)));
p.end();
}

View File

@ -656,7 +656,7 @@ QPixmap FrameSvgPrivate::alphaMask()
void FrameSvgPrivate::generateBackground(FrameData *frame)
{
if (!frame->cachedBackground.isNull()) {
if (!frame->cachedBackground.isNull() || !q->hasElementPrefix(q->prefix())) {
return;
}