[haiku-commits] r34434 - haiku/trunk/src/apps/deskbar

Author: stpere
Date: 2009-12-02 00:49:10 +0100 (Wed, 02 Dec 2009)
New Revision: 34434
Changeset: http://dev.haiku-os.org/changeset/34434/haiku

Modified:
   haiku/trunk/src/apps/deskbar/Switcher.cpp
Log:
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.



Modified: haiku/trunk/src/apps/deskbar/Switcher.cpp
===================================================================
--- haiku/trunk/src/apps/deskbar/Switcher.cpp   2009-12-01 22:51:33 UTC (rev 
34433)
+++ haiku/trunk/src/apps/deskbar/Switcher.cpp   2009-12-01 23:49:10 UTC (rev 
34434)
@@ -1903,11 +1903,13 @@
        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 @@
        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();
 }
 


Other related posts:

  • » [haiku-commits] r34434 - haiku/trunk/src/apps/deskbar - stpere