summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-01 16:20:28 (UTC)
committer sandman <sandman>2002-10-01 16:20:28 (UTC)
commit3352558f31f2f3f5f32730a28f07161fe71787a9 (patch) (unidiff)
tree613a75fb333cfd28f54e29cd2b420889ea4467f0
parent70d2cbd97a6b39b1738e3e6580f916dcf0fbc787 (diff)
downloadopie-3352558f31f2f3f5f32730a28f07161fe71787a9.zip
opie-3352558f31f2f3f5f32730a28f07161fe71787a9.tar.gz
opie-3352558f31f2f3f5f32730a28f07161fe71787a9.tar.bz2
Another performance tweak for busyindicator and alpha-blended bg pixmaps
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 33717bc..e15b150 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -142,3 +142,3 @@ public:
142 timerEvent ( 0 ); 142 timerEvent ( 0 );
143 busytimer = startTimer ( 180 ); 143 busytimer = startTimer ( 200 );
144 } 144 }
@@ -159,3 +159,3 @@ public:
159 159
160 bsy-> repaint ( ); 160 QScrollView::updateContents ( bsy-> pixmapRect ( false ));
161 } 161 }
@@ -204,4 +204,18 @@ public:
204 void setBackgroundPixmap( const QPixmap &pm ) { 204 void setBackgroundPixmap( const QPixmap &pm ) {
205 if ( pm. isNull ( )) {
205 bgPixmap = pm; 206 bgPixmap = pm;
206 } 207 }
208 else {
209 // This is need for bg images with alpha channel
210
211 QPixmap tmp ( pm. size ( ), pm. depth ( ));
212
213 QPainter p ( &tmp );
214 p. fillRect ( 0, 0, pm. width ( ), pm. height ( ), bgColor. isValid ( ) ? bgColor : white );
215 p. drawPixmap ( 0, 0, pm );
216 p. end ( );
217
218 bgPixmap = tmp;
219 }
220 }
207 221
@@ -214,3 +228,3 @@ public:
214 if ( !bgPixmap.isNull() ) { 228 if ( !bgPixmap.isNull() ) {
215 p-> fillRect ( r, bgColor ); 229 //p-> fillRect ( r, bgColor );
216 p->drawTiledPixmap( r, bgPixmap, 230 p->drawTiledPixmap( r, bgPixmap,