From 9a0fbb0a9655eff64fa2c2004dbf8f9d7a96b5b3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 15 Aug 2011 08:41:49 +0000 Subject: Added convertToPremultipliedAlpha() to KImageEffect Fixed "glowing icons" when 32 bit ARGB visuals are in use git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1247329 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kiconloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kdecore') diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp index bd1ad3a91..62950e5d8 100644 --- a/kdecore/kiconloader.cpp +++ b/kdecore/kiconloader.cpp @@ -51,6 +51,8 @@ #include "svgicons/ksvgiconpainter.h" #endif +#include + #include "kiconloader_p.h" /*** KIconThemeNode: A node in the icon theme dependancy tree. ***/ @@ -855,7 +857,8 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si } } - pix.convertFromImage(*img); + if (TQPaintDevice::x11AppDepth() == 32) pix.convertFromImage(KImageEffect::convertToPremultipliedAlpha( *img )); + else pix.convertFromImage(*img); delete img; -- cgit v1.2.1