SImage alpha not recognized in drag and drop decorator

I’m using the SColorTheme classes as a template for building my own drag and drop widgets, but I’m having a problem with the image that follows your cursor after a drag is started.

Everything works fine with it except for the alpha, which just reads as being solid. I’m using the same image as in another widget, which displays it just fine, so I’m wondering if there is a flag I need to turn on to get the alpha recognized in the decorator.

Here’s the code that builds up the decorator:

TSharedPtr<SWidget> FNodeDragDrop::GetDefaultDecorator() const
{
    if(IconBeingDragged != nullptr)
    {
		return SNew(SBox)
        .WidthOverride(32.f)
        .HeightOverride(32.f)
        [
        SNew(SImage).Image(IconBeingDragged)
        ];
    }
    return SNew(SBorder)
    .Cursor(EMouseCursor::GrabHandClosed)
    [
     SNew(SColorBlock)
     .Color(FLinearColor::Green)
     ];
}

IconBeingDragged is declared in the FNodeDragDrop class as:

const FSlateBrush* IconBeingDragged;

And the value that is passed to IconBeingDragged is eventually tracked back to a style sheet and declared as:

UPROPERTY(EditAnywhere, Category = EquationEditorWidgetStyle) FSlateBrush IconAdd;

Any ideas on where I’m going wrong with setting up the alpha for this particular widget?

GetDefaultDecorator() function returns content that is put inside decorator window which is later attached to mouse cursor. So the problem is decorator window (created automatically by slate), not your brush.
According to SWindow::MakeDecoratorWindow() function, the window supports transparency but has Opacity set to 1.0f by default. So your image is drawn using alpha but the window has black background and no transparency, thats why it looks so ugly.

Unfortunately, I think there is no easy way to fix it unless you will handle decorators by yourself - creating windows, putting content into them and moving along mouse cursor. Hope I’m wrong and someone can show us way to do it.

You can also try a workaround and put your image into some border.

Thanks for all the good information, I’ll take another look around soon and see if I can find a good solution / workaround and report back.