Switcher : Use the B_OP_COPY draw mode to clear the icon's background
during the animation, rather than B_OP_ALPHA. This avoids a darker background than supposed when you cycle through the icons. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34434 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
962b2f7296
commit
7dbb668dca
@ -1903,11 +1903,13 @@ TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon)
|
||||
destRect.OffsetBy(BPoint(off, off));
|
||||
|
||||
fOffBitmap->Lock();
|
||||
fOffView->SetDrawingMode(B_OP_ALPHA);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
startIconBounds.InsetBy(amount,amount);
|
||||
snooze(20000);
|
||||
fOffView->SetDrawingMode(B_OP_COPY);
|
||||
fOffView->FillRect(fOffView->Bounds());
|
||||
fOffView->SetDrawingMode(B_OP_ALPHA);
|
||||
fOffView->DrawBitmap(startIcon, startIconBounds);
|
||||
fOffView->Sync();
|
||||
DrawBitmap(fOffBitmap, destRect);
|
||||
@ -1915,13 +1917,14 @@ TIconView::AnimateIcon(BBitmap* startIcon, BBitmap* endIcon)
|
||||
for (int i = 0; i < 2; i++) {
|
||||
startIconBounds.InsetBy(amount,amount);
|
||||
snooze(20000);
|
||||
fOffView->SetDrawingMode(B_OP_COPY);
|
||||
fOffView->FillRect(fOffView->Bounds());
|
||||
fOffView->SetDrawingMode(B_OP_ALPHA);
|
||||
fOffView->DrawBitmap(endIcon, startIconBounds);
|
||||
fOffView->Sync();
|
||||
DrawBitmap(fOffBitmap, destRect);
|
||||
}
|
||||
|
||||
fOffView->SetDrawingMode(B_OP_COPY);
|
||||
fOffBitmap->Unlock();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user