amount of 0 should be a no-op; fast and more accurate results
BUG:263179 svn path=/trunk/KDE/kdelibs/; revision=1214508
This commit is contained in:
parent
007aeb35fb
commit
ce0885ccf3
@ -163,6 +163,10 @@ QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
|
|||||||
return from;
|
return from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qFuzzyCompare(amount, 0)) {
|
||||||
|
return from;
|
||||||
|
}
|
||||||
|
|
||||||
QRect startRect(from.rect());
|
QRect startRect(from.rect());
|
||||||
QRect targetRect(to.rect());
|
QRect targetRect(to.rect());
|
||||||
QSize pixmapSize = startRect.size().expandedTo(targetRect.size());
|
QSize pixmapSize = startRect.size().expandedTo(targetRect.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user