[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Sun Jan 11 20:36:29 CET 2004
CVS commit by arwalker:
Added border to the legend.
M +17 -0 kstlegend.cpp 1.5
--- kdeextragear-2/kst/kst/kstlegend.cpp #1.4:1.5
@@ -160,4 +160,21 @@ void KstLegend::draw(KstBaseCurveList* p
if( bFront ) {
p.fillRect(rectTotal, QBrush( colorBackground ));
+
+ //
+ // draw a border
+ //
+ int iBorderWidth = iCharWidth / 6;
+
+ if( iBorderWidth > 0 ) {
+ QRect rectBorder;
+ QPen penBorder(colorForeground, iBorderWidth);
+
+ rectBorder.setRect( rectTotal.left()+iBorderWidth,
+ rectTotal.top()+iBorderWidth,
+ rectTotal.width()-2*iBorderWidth,
+ rectTotal.height()-2*iBorderWidth );
+ p.setPen( penBorder );
+ p.drawRect( rectTotal );
+ }
}
More information about the Kst
mailing list