[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-29 21:00:10
Message-ID: 1243630810.106181.16527.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 975320 by sandsmark:

fill with a proper background color, instead of transparency.



 M  +6 -2      map.cpp  
 M  +10 -7     map.h  


--- trunk/playground/utils/filelight/src/part/radialMap/map.cpp #975319:975320
@@ -44,9 +44,10 @@
         , m_ringBreadth(MIN_RING_BREADTH)
         , m_innerRadius(0)
         , m_summary(summary)
+        , m_scheme(QPalette::Active, KColorScheme::View)
 {
+    m_pixmap.fill(m_scheme.background().color());
 
-    m_pixmap.fill(Qt::transparent);
     //FIXME this is all broken. No longer is a maximum depth!
     const int fmh   = QFontMetrics(QFont()).height();
     const int fmhD4 = fmh / 4;
@@ -84,6 +85,9 @@
     //colour the segments
     colorise();
 
+    //paint the pixmap
+    paint();
+
     //determine centerText
     if (!refresh)
     {
@@ -137,7 +141,7 @@
             m_rect.setRect(0,0,size,size);
         }
         m_pixmap = QPixmap(m_rect.size());
-        m_pixmap.fill(Qt::transparent);
+        m_pixmap.fill(m_scheme.background().color());
 
         //resize the pixmap
         size += MAP_2MARGIN;
--- trunk/playground/utils/filelight/src/part/radialMap/map.h #975319:975320
@@ -28,6 +28,8 @@
 #include <QRect>
 #include <QString>
 
+#include <KColorScheme>
+
 namespace RadialMap {
 class Segment;
 
@@ -65,13 +67,14 @@
 
     Chain<Segment> *m_signature;
 
-    QRect   m_rect;
-    uint    m_visibleDepth; ///visible level depth of system
-    QPixmap m_pixmap;
-    uint    m_ringBreadth;  ///ring breadth
-    uint    m_innerRadius;  ///radius of inner circle
-    QString m_centerText;
-    bool    m_summary;
+    QRect        m_rect;
+    uint         m_visibleDepth; ///visible level depth of system
+    QPixmap      m_pixmap;
+    uint         m_ringBreadth;  ///ring breadth
+    uint         m_innerRadius;  ///radius of inner circle
+    QString      m_centerText;
+    bool         m_summary;
+    KColorScheme m_scheme;
 
     uint MAP_2MARGIN;
 };

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

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