From kde-commits Thu Sep 30 23:21:59 2010 From: Johannes Simon Date: Thu, 30 Sep 2010 23:21:59 +0000 To: kde-commits Subject: branches/KDE/4.5/kdelibs/kio/kio Message-Id: <20100930232159.8B700AC891 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=128588897530280 SVN commit 1181414 by jsimon: Backport r1181413 from trunk: Somehow a QPixmap on Mac OS doesn't support alpha blending M +9 -2 kfileitemdelegate.cpp --- branches/KDE/4.5/kdelibs/kio/kio/kfileitemdelegate.cpp #1181413:1181414 @@ -597,9 +597,16 @@ QColor color; color.setAlphaF(amount); +// FIXME: Somehow this doesn't work on Mac OS.. +#if defined(Q_OS_MAC) + const bool usePixmap = false; +#else + const bool usePixmap = from.paintEngine()->hasFeature(QPaintEngine::PorterDuff) && + from.paintEngine()->hasFeature(QPaintEngine::BlendModes); +#endif + // If the native paint engine supports Porter/Duff compositing and CompositionMode_Plus - if (from.paintEngine()->hasFeature(QPaintEngine::PorterDuff) && - from.paintEngine()->hasFeature(QPaintEngine::BlendModes)) + if (usePixmap) { QPixmap under = from; QPixmap over = to;