diff --git a/animations/pixmaptransition.cpp b/animations/pixmaptransition.cpp index e1b45b997..73bb9050a 100644 --- a/animations/pixmaptransition.cpp +++ b/animations/pixmaptransition.cpp @@ -144,7 +144,7 @@ void PixmapTransition::updateCurrentTime(int currentTime) if (m_currentPixmap.isNull()) { m_currentPixmap = QPixmap(m_targetPixmap.size()); } - m_currentPixmap.fill(QColor(0, 0, 0, (int)(((qreal)255)*delta))); + m_currentPixmap.fill(QColor(0, 0, 0, (int)(((qreal)255)*qMin((qreal)0.98, delta)))); QPainter p(&m_currentPixmap); p.setCompositionMode(QPainter::CompositionMode_SourceIn); p.drawPixmap(m_currentPixmap.rect(), m_targetPixmap, m_targetPixmap.rect()); @@ -153,7 +153,7 @@ void PixmapTransition::updateCurrentTime(int currentTime) m_currentPixmap = m_startPixmap; QPainter p(&m_currentPixmap); p.setCompositionMode(QPainter::CompositionMode_DestinationIn); - p.fillRect(m_currentPixmap.rect(), QColor(0, 0, 0, (int)(((qreal)255)*delta))); + p.fillRect(m_currentPixmap.rect(), QColor(0, 0, 0, (int)(((qreal)255)*qMin((qreal)0.98, delta)))); p.end(); } }