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

List:       kde-commits
Subject:    kdeartwork/styles/plastik
From:       Maks Orlovich <maksim () kde ! org>
Date:       2004-07-29 15:07:06
Message-ID: 20040729150706.084E399D1 () office ! kde ! org
[Download RAW message or body]

CVS commit by orlovich: 

A couple trivial things I noticed when debugging an apparent Qt bug triggered by \
plastik that  Beineri mentionned: 
-Fix "QPainter::killPStack: non-empty save/restore stack when end() was called" -- in \
the pixmap path  in drawPixel save was not matched by restore
-Do not call setClipping(true) after setClipRegion. It's redundant -- setClipRegion \
calls setClipping itself ---  and can trigger Xft bugs w/some Xft versions.


  M +4 -10     plastik.cpp   1.87


--- kdeartwork/styles/plastik/plastik.cpp  #1.86:1.87
@@ -696,6 +696,4 @@ void PlastikStyle::renderPixel(QPainter 
             bool fullAlphaBlend) const
 {
-    p->save();
-
     if(fullAlphaBlend)
     // full alpha blend: paint into an image with alpha buffer and convert to a \
pixmap ... @@ -734,4 +732,5 @@ void PlastikStyle::renderPixel(QPainter 
     // don't use an alpha buffer: calculate the resulting color from the alpha \
value, the fg- and the bg-color.  {
+        p->save();
         QRgb rgb_a = color.rgb();
         QRgb rgb_b = background.rgb();
@@ -746,7 +745,6 @@ void PlastikStyle::renderPixel(QPainter 
         p->setPen(res);
         p->drawPoint(pos);
-    }
-
     p->restore();
+    } 
 }
 
@@ -1435,5 +1433,4 @@ void PlastikStyle::drawKStylePrimitive(K
                     mask -= QRegion(xcenter+4, ycenter+4, 1, 4);
                     p->setClipRegion(mask);
-                    p->setClipping(true);
                     uint surfaceFlags = \
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;  \
if(!enabled) @@ -1486,5 +1483,4 @@ void PlastikStyle::drawKStylePrimitive(K
                     mask -= QRegion(xcenter+4, ycenter+4, 4, 1);
                     p->setClipRegion(mask);
-                    p->setClipping(true);
                     uint surfaceFlags = \
Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|  \
Round_UpperRight|Is_Horizontal; @@ -1866,5 +1862,4 @@ void \
PlastikStyle::drawPrimitive(Primiti  }
             p->setClipRegion(bmp);
-            p->setClipping(true);
             renderSurface(p, r,
                     cg.background(), contentColor, getColor(cg,MouseOverHighlight), \
enabled?_contrast+3:(_contrast/2), surfaceFlags); @@ -2305,5 +2300,4 @@ void \
PlastikStyle::drawControl(ControlEl  }
                 p->setClipRegion(mask);
-                p->setClipping(true);
                 int counter = 0;
                 QPixmap surfaceTile(21, r.height()-2);


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

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