Bug 95018 - symbol scaling problem in legend
Summary: symbol scaling problem in legend
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-12 21:40 UTC by Nicolas Brisset
Modified: 2004-12-13 02:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2004-12-12 21:40:04 UTC
Version:           1.1.0_devel (using KDE 3.2 BRANCH >= 20040204, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
OS:                Linux (i686) release 2.6.3-7mdk

(Seems to be new since 1.0.0)
If you choose to use symbols for a curve in a plot that shows its legend, you'll notice that the symbol is HUGE !
It also seems to me that the drawing it much slower than in 1.0.0, but if it is confirmed I suppose I'll open another report.
Comment 1 Andrew Walker 2004-12-13 02:22:17 UTC
CVS commit by arwalker: 

Draw legend of correct size and correct line type.

CCMAIL: 95018-done@bugs.kde.org


  M +3 -2      kstlegend.cpp   1.19


--- kdeextragear-2/kst/kst/kstlegend.cpp  #1.18:1.19
@@ -184,13 +184,14 @@ void KstLegend::draw(KstBaseCurveList* p
         // draw the corresponding line and point...
         //
-        p.setPen(QPen((*it)->color(), (*it)->lineWidth(), KstLineStyle[(*it)->lineStyle()]));
         iX = iX + iLineWidth + iCharWidth;
         iY = py - iLineHeight/2;
         if((*it)->hasLines()) {
+          p.setPen(QPen((*it)->color(), (*it)->lineWidth(), KstLineStyle[(*it)->lineStyle()]));
           p.drawLine(iX, iY, iX+2*iCharWidth, iY);
         }
         if((*it)->hasPoints()) {
+          p.setPen(QPen((*it)->color(), (*it)->lineWidth()));
           tmppoint.setType((*it)->Point.type());
-          tmppoint.draw(&p, iX+iCharWidth, iY, 600);
+          tmppoint.draw(&p, iX+iCharWidth, iY, (*it)->lineWidth(), 600);
         }
         py += iLineSpace;