mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 21:48:35 +01:00
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:
parent
035f2c2a4d
commit
93ced9a11c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user