The dragged icon is now slightly transparent.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-11-15 17:56:46 +00:00
parent 035f2c2a4d
commit 93ced9a11c

View File

@ -744,7 +744,21 @@ IconView::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage)
icon->CopyTo(message);
BBitmap *dragBitmap = new BBitmap(fIcon);
BBitmap *dragBitmap = new BBitmap(fIcon->Bounds(), B_RGB32, true);
dragBitmap->Lock();
BView *view = new BView(dragBitmap->Bounds(), B_EMPTY_STRING, B_FOLLOW_NONE, 0);
dragBitmap->AddChild(view);
view->SetHighColor(B_TRANSPARENT_COLOR);
view->FillRect(dragBitmap->Bounds());
view->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
view->SetDrawingMode(B_OP_ALPHA);
view->SetHighColor(0, 0, 0, 160);
view->DrawBitmap(fIcon);
view->Sync();
dragBitmap->Unlock();
DragMessage(&message, dragBitmap, B_OP_ALPHA, fDragPoint, this);
fDragging = true;
SetMouseEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);