[Feature Request] Expose / get rid of ESlateDrawEffect::DisabledEffect

When widgets (Slate or UMG) are disabled, they usually appear greyed out. This happens on top of any styling that we define for widgets. An example: UMG buttons allow us to set a background style for when the button is disabled. The greying-out is applied to the button and its children on top of what we defined as the desired disabled styling.

This is a huge pain as it effectively prevents us to make disabled widgets appear exactly as we want them to. The reason why this happens is that Slate adds certain effects to widgets under certain circumstances. The types of effects are defined in the ESlateDrawEffect enum. One possible value of that enum is ESlateDrawEffect::DisabledEffect, which causes the widget to be greyed out as seen in the code snippet below.

int32 SImage::OnPaint( const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
    const bool bIsEnabled = ShouldBeEnabled(bParentEnabled);
    const ESlateDrawEffect DrawEffects = bIsEnabled ? ESlateDrawEffect::None : ESlateDrawEffect::DisabledEffect;

This code causes an image to receive the greyed-out effect if it is a child of a disabled button, for example.

What I propose is one of two things:

  1. Get rid of this specific effect entirely. Or rather, get rid of hardcoding it in a way that forces us to override SWidget classes just for the sake of having true control over widget styling. Having a default visual cue for when an interactive element is disabled is without a doubt a good thing. Making it impossible to replace with something else, less so.
  2. Add an option to UI developer settings that allows us to disable the behavior on a per-project basis. I’m thinking about something similar to how the focus outline is handled. Let us check a box that disables the effect and puts us in complete control over disabled widget styling.

I did a lot of searches, but this excellent feature request did not show up until I searched for “unreal disabledeffect”, which I only knew to look for after encountering it buried in the engine code. So to perhaps make this request easier to find when trying to deal with the hard-coded greyed out effect, I figure it might help to add some of the search terms I used:

unreal disabled button children tint
unreal disabled child widgets
unreal widget tint child
unreal widget tint contained

I also tried to find what caused this via Color and Opacity, Render Opacity, replacing the image for the disabled style, and I also tried to find any information about style inheritance in slate and UMG.

Anyway, thanks for the suggested work-around and-rad. And yes, Unreal should definitely fix this.