summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-25 07:11:37 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-25 07:11:37 +0000
commit00892b3ece0c219a4cb4d6a3f1f5e6573c9a07de (patch)
treedbd610f57f75c7a73f1c9f7e57c5cf07280665cd
parent7d5dd09ee26381b6a41d01fbe7ab04e9b5bddc2a (diff)
downloadtdelibs-00892b3ece0c219a4cb4d6a3f1f5e6573c9a07de.tar.gz
tdelibs-00892b3ece0c219a4cb4d6a3f1f5e6573c9a07de.zip
Fix system tray icons when the parent application is in ARGB mode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1249387 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-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
}