summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index dbcb0d7..5daaeff 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -84,5 +84,5 @@ public:
}
- QPixmap* busyPixmap() const { return (QPixmap*)&bpm; }
+ QPixmap* busyPixmap() const { return (QPixmap*)&bpm[::abs(busystate)]; }
QIconViewItem* busyItem() const { return bsy; }
void setBigIcons( bool bi ) { bigIcns = bi; }
@@ -104,9 +104,9 @@ public:
if ( bsy ) {
+ busystate = 5;
+ for ( int i = 0; i <= 5; i++ )
+ bpm [i] = QPixmap ( );
+ timerEvent ( 0 );
busytimer = startTimer ( 150 );
- busystate = 50;
- // not sure what this startTimer is for, maybe i am just to tired. But
- // currently that causes 100% cpuload on app launch
- //startTimer ( 0 );
}
else
@@ -119,4 +119,5 @@ public:
if ( !te || ( te-> timerId ( ) == busytimer )) {
if ( bsy ) {
+ if ( bpm [::abs(busystate)]. isNull ( )) {
QPixmap *src = bsy-> QIconViewItem::pixmap();
QImage img = src->convertToImage();
@@ -131,5 +132,5 @@ public:
}
int rc, gc, bc;
- int bs = ::abs ( busystate ) + 25;
+ int bs = ::abs ( busystate * 10 ) + 25;
colorGroup().highlight().rgb( &rc, &gc, &bc );
rc = rc * bs / 100;
@@ -145,11 +146,11 @@ public:
}
- bpm.convertFromImage( img );
-
+ bpm [::abs(busystate)].convertFromImage( img );
+ }
bsy-> repaint ( );
- busystate += 10;
- if ( busystate > 50 )
- busystate = -40;
+ busystate++;
+ if ( busystate > 5 )
+ busystate = -4;
}
}
@@ -312,5 +313,5 @@ private:
bool bigIcns;
QPixmap bgPixmap;
- QPixmap bpm;
+ QPixmap bpm [6];
QColor bgColor;
int busytimer;