[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/extensions/kasbar
From: Richard J. Moore <rich () kde ! org>
Date: 2004-11-20 21:17:47
Message-ID: 20041120211747.8109816F21 () office ! kde ! org
[Download RAW message or body]
CVS commit by rich:
- Fixed a warning from KImageEffect about the image being invalid when we draw
the load gradient and the load is 0.
M +5 -1 kasloaditem.cpp 1.3
--- kdebase/kicker/extensions/kasbar/kasloaditem.cpp #1.2:1.3
@@ -83,5 +83,9 @@ void KasLoadItem::paint( QPainter *p )
double dh = extent()-16;
dh = dh / maxValue;
+
int h = (int) floor( dh * val );
+ int w = extent()-4;
+ h = (h > 0) ? h : 1;
+ w = (w > 0) ? w : 1;
KasItem::paint( p );
@@ -91,5 +95,5 @@ void KasLoadItem::paint( QPainter *p )
KPixmap pix;
- pix.resize( extent()-4, h );
+ pix.resize( w, h );
KPixmapEffect::gradient( pix, light, dark, KPixmapEffect::DiagonalGradient );
p->drawPixmap( 2, extent()-2-h, pix );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic