From ef3e69f6728d2dfea1b1c5538bfc9ba3b5965e0b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 10 Feb 2010 21:54:12 +0000 Subject: [PATCH] never make the pixmap fully opaque, because the alpha channel would get disabled, obtaining a so pretty black rectangle svn path=/trunk/KDE/kdelibs/; revision=1088460 --- animations/pixmaptransition.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }