[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/utils/filelight/src/part/radialMap
From:       Martin Tobias Holmedahl Sandsmark <sandsmark () samfundet ! no>
Date:       2009-05-12 17:32:09
Message-ID: 1242149529.893560.22058.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 967148 by sandsmark:

only set alpha if we have working compositing

 M  +4 -2      segmentTip.cpp  


--- trunk/playground/utils/filelight/src/part/radialMap/segmentTip.cpp #967147:967148
@@ -30,6 +30,7 @@
 #include <KGlobal>
 #include <KGlobalSettings>
 #include <KLocale>
+#include <KWindowSystem>
 
 #include <QPainter>
 #include <QEvent>
@@ -105,8 +106,10 @@
 
     QColor bg = QToolTip::palette().color(QPalette::Active, QPalette::Background);
     const QColor fg = QToolTip::palette().color(QPalette::Active, QPalette::WindowText);
-    bg.setAlpha(200);
 
+    if (KWindowSystem::compositingActive())
+        bg.setAlpha(200);
+
     m_pixmap.fill(bg);
 
     QPainter paint(&m_pixmap);
@@ -115,7 +118,6 @@
     paint.setPen(fg);
     paint.drawRect(rect());
     paint.drawText(rect(), Qt::AlignCenter, m_text);
-    update();
 }
 
 bool
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic