author | sandman <sandman> | 2002-09-29 02:08:31 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-29 02:08:31 (UTC) |
commit | b7fcdc189dacc8e054a32090af4677bc86955491 (patch) (side-by-side diff) | |
tree | 43b500b48fb7718a8c84b7aab91398c568b64b5d | |
parent | d6ac648c6f0f504f2f9c3b21d62524d3167682ae (diff) | |
download | opie-b7fcdc189dacc8e054a32090af4677bc86955491.zip opie-b7fcdc189dacc8e054a32090af4677bc86955491.tar.gz opie-b7fcdc189dacc8e054a32090af4677bc86955491.tar.bz2 |
compromise for the new busy indicator:
old explosion + new highlight = exploding highlight ;)
-rw-r--r-- | core/launcher/launcherview.cpp | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index c2bde53..9f86136 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -69,2 +69,3 @@ public: ike = FALSE; + busytimer = 0; calculateGrid( Bottom ); @@ -99,4 +100,21 @@ public: if ( bsy != c ) { - if ( c ) { - QPixmap *src = c->pixmap(); + if ( bsy ) + bsy-> repaint ( ); + bsy = c; + + if ( bsy ) { + busytimer = startTimer ( 150 ); + busystate = 50; + startTimer ( 0 ); + } + else + killTimer ( busytimer ); + } + } + + virtual void timerEvent ( QTimerEvent *te ) + { + if ( !te || ( te-> timerId ( ) == busytimer )) { + if ( bsy ) { + QPixmap *src = bsy-> QIconViewItem::pixmap(); QImage img = src->convertToImage(); @@ -112,8 +130,12 @@ public: int rc, gc, bc; + int bs = ::abs ( busystate ) + 25; colorGroup().highlight().rgb( &rc, &gc, &bc ); - int ri, gi, bi; + rc = rc * bs / 100; + gc = gc * bs / 100; + bc = bc * bs / 100; + for ( int r = 0; r < count; r++, rgb++ ) { - int ri = (rc+qRed(*rgb))/2; - int gi = (gc+qGreen(*rgb))/2; - int bi = (bc+qBlue(*rgb))/2; + int ri = rc + qRed ( *rgb ) * ( 100 - bs ) / 100; + int gi = gc + qGreen ( *rgb ) * ( 100 - bs ) / 100; + int bi = bc + qBlue ( *rgb ) * ( 100 - bs ) / 100; int ai = qAlpha(*rgb); @@ -123,7 +145,9 @@ public: bpm.convertFromImage( img ); + + bsy-> repaint ( ); + + busystate += 10; + if ( busystate > 50 ) + busystate = -40; } - QIconViewItem* o = bsy; - bsy = c; - if ( o ) o->repaint(); - if ( c ) c->repaint(); } @@ -289,2 +313,4 @@ private: QColor bgColor; + int busytimer; + int busystate; }; |