-rw-r--r-- | core/applets/volumeapplet/oledbox.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/applets/volumeapplet/oledbox.cpp b/core/applets/volumeapplet/oledbox.cpp index 3036929..7547287 100644 --- a/core/applets/volumeapplet/oledbox.cpp +++ b/core/applets/volumeapplet/oledbox.cpp | |||
@@ -148,8 +148,10 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK | |||
148 | QColor color; | 148 | QColor color; |
149 | QBrush brush; | 149 | QBrush brush; |
150 | QPen pen; | 150 | QPen pen; |
151 | 151 | ||
152 | pix-> fill ( black ); | ||
153 | |||
152 | // First of all we want to know what area should be updated | 154 | // First of all we want to know what area should be updated |
153 | // Initialize coordinates, width, and height of the LED | 155 | // Initialize coordinates, width, and height of the LED |
154 | int width = pix-> width ( ); | 156 | int width = pix-> width ( ); |
155 | 157 | ||
@@ -218,9 +220,12 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK | |||
218 | // from the upper left. | 220 | // from the upper left. |
219 | 221 | ||
220 | #ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC | 222 | #ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC |
221 | paint. drawPixmap ( 0, 0, *s_border_pix ); | 223 | paint. drawPixmap ( 0, 0, *s_border_pix ); |
222 | 224 | paint. end ( ); | |
225 | |||
226 | pix-> setMask ( pix-> createHeuristicMask ( )); | ||
227 | |||
223 | #else | 228 | #else |
224 | pen.setWidth( 3 ); | 229 | pen.setWidth( 3 ); |
225 | brush.setStyle( QBrush::NoBrush ); // Switch off the brush | 230 | brush.setStyle( QBrush::NoBrush ); // Switch off the brush |
226 | paint.setBrush( brush ); // This avoids filling of the ellipse | 231 | paint.setBrush( brush ); // This avoids filling of the ellipse |
@@ -252,9 +257,8 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK | |||
252 | if ( shadow_color < 100 ) | 257 | if ( shadow_color < 100 ) |
253 | shadow_color = 100; | 258 | shadow_color = 100; |
254 | } // end if ( angle < 2320 ) | 259 | } // end if ( angle < 2320 ) |
255 | } // end for ( angle = 720; angle < 6480; angle += 160 ) | 260 | } // end for ( angle = 720; angle < 6480; angle += 160 ) |
256 | #endif | ||
257 | paint.end(); | 261 | paint.end(); |
258 | // | 262 | // |
259 | // painting done | 263 | // painting done |
260 | 264 | ||
@@ -263,8 +267,9 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK | |||
263 | mp. setPen ( Qt::NoPen ); | 267 | mp. setPen ( Qt::NoPen ); |
264 | mp. setBrush ( Qt::color1 ); | 268 | mp. setBrush ( Qt::color1 ); |
265 | mp. drawEllipse ( 0, 0, width + 2, width + 2 ); | 269 | mp. drawEllipse ( 0, 0, width + 2, width + 2 ); |
266 | mp. end ( ); | 270 | mp. end ( ); |
267 | 271 | ||
268 | pix-> setMask ( mask ); | 272 | pix-> setMask ( mask ); |
273 | #endif | ||
269 | } | 274 | } |
270 | 275 | ||