BraceYourselfGames / UE-BYGRichText

Rich text library supporting customizable Markdown formatting
BSD 3-Clause "New" or "Revised" License
142 stars 18 forks source link

BYGRichTextBlock resizes when zooming in and out in UMG editor #1

Closed Grimeh closed 3 years ago

Grimeh commented 3 years ago

rt_sizing (the top box is a BYG Rich Text block, the bottom is a builtin rich text block with the desired behaviour)

Repro info

I have a UMG hierarchy that looks like: Canvas/Canvas/Horizontal Box/Vertical Box/BYG Rich Text Block When scrolling in and out in the UMG editor, the rich text block will appear to resize itself depending on the zoom level. When you compile the user widget or change a property on the rich text block, everything goes back to normal (the text block goes back to one line using the example gif above).

My best guess is this has something to do with DPI or "desired size", but I'm not familiar enough with UMG/Slate's layout system to properly guess.

drichardson commented 3 years ago

Can you show the modified properties for each widget in the hierarchy? I'm interesting to see where Size to Content is used and where Auto Wrap Text is used. I've seen similar issues with text boxes during resizing.

Grimeh commented 3 years ago

Sure thing, here are screenshots for each widget in the immediate hierarchy. The only modifications are in the slot properties.

CanvasPanel_0 - no modifications, sized to 1920x1080, DPI scale 1.0. Can repro @ 720 with DPI 0.67.

CanvasPanel_1 image

HorizontalBox_0 image

VerticalBox_103 image

ChoiceExample - BYGRichTextBlock image

benui-dev commented 3 years ago

This also happens in-game. Even if there is enough space, sometimes it is wrapped, sometimes it is not.

I have confirmed that this happens with the default text widget when autowrap is enabled and it is set to "auto" in a horizontal box. In the gif the top one is a regular UE4 text block, the one below is a BYG Rich Text Box

Grimeh commented 3 years ago

Huh, my mistake then! Thanks for clearing that up, sorry to waste time on a non-issue.