The child widget of Retainerbox was applied incorrectly offset the RenderTranslation of the parent widget and draws it. This issue is 4.24 only. it's fine as well as the preview on UMG Designer in 4.22 and 4.23.
Result:
TextBlock displayed with wrong offset. . (offset: x=200.0, y=200.0)
Expect:
TextBlock displayed correct. (offset: x=100.0, y=100.0)
Workaround:
Applying the following change.
int32 SRetainerWidget::PaintSlowPath(const FSlateInvalidationContext& Context) { #if 1 FGeometry AllottedGeometry = GetPaintSpaceGeometry(); const FPaintGeometry PaintGeometry = AllottedGeometry.ToPaintGeometry(); const FVector2D RenderSize = PaintGeometry.GetLocalSize() * PaintGeometry.GetAccumulatedRenderTransform().GetMatrix().GetScale().GetVector(); const uint32 RenderTargetWidth = FMath::RoundToInt(RenderSize.X); const uint32 RenderTargetHeight = FMath::RoundToInt(RenderSize.Y); const float Scale = AllottedGeometry.Scale; const FVector2D DrawSize = FVector2D(RenderTargetWidth, RenderTargetHeight); const FGeometry RetainedWindowGeometry = FGeometry::MakeRoot(DrawSize * ( 1 / Scale ), FSlateLayoutTransform(Scale, PaintGeometry.DrawPosition)); return SCompoundWidget::OnPaint(*Context.PaintArgs, RetainedWindowGeometry, Context.CullingRect, *Context.WindowElementList, Context.IncomingLayerId, Context.WidgetStyle, Context.bParentEnabled); #else return SCompoundWidget::OnPaint(*Context.PaintArgs, GetPaintSpaceGeometry(), Context.CullingRect, *Context.WindowElementList, Context.IncomingLayerId, Context.WidgetStyle, Context.bParentEnabled); #endif }
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-88093 in the post.
20 |
Component | UE - Editor - UI Systems |
---|---|
Affects Versions | 4.24, 4.24.2 |
Target Fix | 4.27 |
Created | Feb 5, 2020 |
---|---|
Resolved | Feb 22, 2021 |
Updated | Feb 24, 2021 |