summaryrefslogtreecommitdiff
path: root/core/launcher/launcherview.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 0d0f2cb..cd9c14b 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -424,48 +424,50 @@ void LauncherItem::paintAnimatedIcon( QPainter *p )
int w = pixmap()->width(), h = pixmap()->height();
QPixmap dblBuf( w, h + 4 );
QPainter p2( &dblBuf );
int x1, y1;
if ( liv->itemTextPos() == QIconView::Bottom ) {
x1 = x() + (width() - w) / 2 - liv->contentsX();
y1 = y() - liv->contentsY();
} else {
x1 = x() - liv->contentsX();
y1 = y() + (height() - h) / 2 - liv->contentsY();
}
y1 -= 2;
p2.translate(-x1,-y1);
liv->drawBackground( &p2, QRect(x1,y1,w,h+4) );
int bounceY = 2;
#ifdef BOUNCE_BUSY_ICON
if ( busyType == BIT_Animated ) {
bounceY = 4 - ((iteration+2)%8);
bounceY = bounceY < 0 ? -bounceY : bounceY;
}
#endif
p2.drawPixmap( x1, y1 + bounceY, *pixmap() );
#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
p2.drawPixmap( x1, y1 + bounceY, liv->busyPixmap(), w * pic, 0, w, h );
+#else
+ Q_UNUSED( pic )
#endif
p->drawPixmap( x1, y1, dblBuf );
}
void LauncherItem::animateIcon()
{
LauncherIconView* liv = (LauncherIconView*)iconView();
if ( liv->busyItem() != this || !app )
return;
// Highlight the icon
if ( iteration == 0 ) {
QPixmap src = isBigIcon ? app->bigPixmap() : app->pixmap();
QImage img = src.convertToImage();
QRgb *rgb;
int count;
if ( img.depth() == 32 ) {
rgb = (QRgb*)img.bits();
count = img.bytesPerLine()/sizeof(QRgb)*img.height();
} else {
rgb = img.colorTable();
count = img.numColors();
}