From 49710f20cf0e52ea3393027ed066f11e977e3457 Mon Sep 17 00:00:00 2001 From: sandman Date: Thu, 27 Jun 2002 22:03:59 +0000 Subject: Workaround for the "LEDs dont't show on 38xx" aka "Qt/E is too dumb to draw a circle" bug --- (limited to 'core/applets/volumeapplet/oledbox.cpp') 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 @@ -149,6 +149,8 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK QBrush brush; QPen pen; + pix-> fill ( black ); + // First of all we want to know what area should be updated // Initialize coordinates, width, and height of the LED int width = pix-> width ( ); @@ -219,7 +221,10 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK #ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC paint. drawPixmap ( 0, 0, *s_border_pix ); - + paint. end ( ); + + pix-> setMask ( pix-> createHeuristicMask ( )); + #else pen.setWidth( 3 ); brush.setStyle( QBrush::NoBrush ); // Switch off the brush @@ -253,7 +258,6 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK shadow_color = 100; } // end if ( angle < 2320 ) } // end for ( angle = 720; angle < 6480; angle += 160 ) -#endif paint.end(); // // painting done @@ -264,7 +268,8 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK mp. setBrush ( Qt::color1 ); mp. drawEllipse ( 0, 0, width + 2, width + 2 ); mp. end ( ); - + pix-> setMask ( mask ); +#endif } -- cgit v0.9.0.2