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

List:       kde-commits
Subject:    extragear/utils/kpager
From:       Pino Toscano <pino () kde ! org>
Date:       2010-12-31 21:09:34
Message-ID: 20101231210934.0F09DAC8AE () svn ! kde ! org
[Download RAW message or body]

SVN commit 1210512 by pino:

get rid of the custom pixmap to avoid flickering on paint

this was a qt3 hack, qt4 does that natively (and better)


 M  +2 -8      desktop.cpp  


--- trunk/extragear/utils/kpager/desktop.cpp #1210511:1210512
@@ -398,10 +398,9 @@
 
 void Desktop::paintEvent( QPaintEvent * )
 {
-  QPixmap pixmap(width(),height());
   QPainter p;
 
-  p.begin(&pixmap);
+  p.begin(this);
 //  p.setFont(font());
 //  p.fillRect(rect(), colorGroup().brush(QPalette::Dark));
 //  p.setPen(Qt::black);
@@ -425,7 +424,7 @@
 
       p.drawPixmap(0,0,tmp);
     }
-     else pixmap.fill(Qt::gray);
+     else p.fillRect(rect(), Qt::gray);
   }
   else
     p.fillRect(rect(), palette().brush(QPalette::Mid));
@@ -475,11 +474,6 @@
     p.drawRect(rect());
     p.end();
 
-    // blit pixmap to widget
-    p.begin(this);
-    p.drawPixmap(0,0,pixmap);
-    p.end();
-
     m_grabWindows=false;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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