Bug 127393 - Label font color not respected
Summary: Label font color not respected
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 22:00 UTC by Andrew Walker
Modified: 2006-05-15 22:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2006-05-15 22:00:37 UTC
Version:           HEAD (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
OS:                Linux

STEPS TO REPRODUCE:
Start Kst
Create a label and set the font color to green.

RESULTS:
The label is displayed with a black font

EXPECTED RESULTS:
The label is displayed with a green font.
Comment 1 George Staikos 2006-05-15 22:27:32 UTC
SVN commit 541263 by staikos:

use the GUI-selected pen
BUG: 127393


 M  +1 -3      kstviewlabel.cpp  
 M  +1 -1      labelrenderer.cpp  
 M  +1 -0      labelrenderer.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewlabel.cpp #541262:541263
@@ -316,9 +316,7 @@
   p.translate(tx, ty);
   p.rotate(_rotation);
 
-  QPen pen;
-  pen.setColor(foregroundColor());
-  p.setPen(pen);
+  rc.pen = foregroundColor();
 
   rc.xStart = rc.x;
 #ifdef BENCHMARK
--- trunk/extragear/graphics/kst/src/libkstapp/labelrenderer.cpp #541262:541263
@@ -58,7 +58,7 @@
     if (rc.p && fi->attributes.color.isValid()) {
       rc.p->setPen(fi->attributes.color);
     } else if (rc.p) {
-      rc.p->setPen(QColor(0, 0, 0));
+      rc.p->setPen(rc.pen);
     }
     rc.setFont(f);
 
--- trunk/extragear/graphics/kst/src/libkstapp/labelrenderer.h #541262:541263
@@ -122,6 +122,7 @@
   int precision;
   bool substitute;
   QValueVector<DataRef> *_cache;
+  QPen pen;
   
   private:
     QFont _font;