summaryrefslogtreecommitdiffstats
path: root/kdeui/ksystemtray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui/ksystemtray.cpp')
-rw-r--r--kdeui/ksystemtray.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/kdeui/ksystemtray.cpp b/kdeui/ksystemtray.cpp
index f0586ab28..5374c49f8 100644
--- a/kdeui/ksystemtray.cpp
+++ b/kdeui/ksystemtray.cpp
@@ -34,6 +34,7 @@
#include <qxembed.h>
#endif
+#include <kimageeffect.h>
#include <kiconloader.h>
#include <kconfig.h>
@@ -325,9 +326,12 @@ TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, KInsta
void KSystemTray::setPixmap( const TQPixmap& p )
{
- TQLabel::setPixmap( p );
+ TQPixmap iconPixmapToSet = p;
+ if (TQPaintDevice::x11AppDepth() == 32) iconPixmapToSet.convertFromImage(KImageEffect::convertToPremultipliedAlpha( iconPixmapToSet.convertToImage() ));
+ if (TQPaintDevice::x11AppDepth() == 32) setBackgroundMode( NoBackground );
+ TQLabel::setPixmap( iconPixmapToSet );
#ifdef Q_WS_X11
- KWin::setIcons( winId(), p, TQPixmap());
+ KWin::setIcons( winId(), iconPixmapToSet, TQPixmap());
#endif
}