[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Fri Aug 5 22:07:19 CEST 2005


SVN commit 443331 by rchern:

fix tie box fill color

 M  +7 -5      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #443330:443331
@@ -2260,14 +2260,16 @@
 
 void Kst2DPlot::updateTieBox(QPainter& p) {
   QRect tr = GetTieBoxRegion();
-  p.setPen(foregroundColor());
+  QColor fillColor;
   if (isTied()) {
-    p.fillRect(tr, QColor((foregroundColor().red() + backgroundColor().red()) / 2,
-                          (foregroundColor().green() + backgroundColor().green()) / 2,
-                          (foregroundColor().blue() + backgroundColor().blue()) / 2));
+    fillColor.setRgb((foregroundColor().red() + backgroundColor().red()) / 2,
+                     (foregroundColor().green() + backgroundColor().green()) / 2,
+                     (foregroundColor().blue() + backgroundColor().blue()) / 2);
   } else {
-    p.fillRect(tr, backgroundColor());
+    fillColor = backgroundColor();  
   }
+  p.setPen(foregroundColor());
+  p.setBrush(fillColor);
   p.drawRect(tr);
   if (_hasFocus) {
     tr.setSize(tr.size() / 2);


More information about the Kst mailing list