Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextLabel: percent-sized images are incorrectly calculated for line wraps on RTL resize #84067

Closed
Koyper opened this issue Oct 27, 2023 · 0 comments · Fixed by #84287
Closed
Assignees
Milestone

Comments

@Koyper
Copy link
Contributor

Koyper commented Oct 27, 2023

Godot version

4.2beta3

System information

MacOS Ventura

Issue description

When resizing a RTL with images set with percent size, the image size is correctly updated, but the calculation for wrapped line width for wrapped lines containing an image are not correctly updated.

This causes incorrect line wrapping per the attached videos. Debug rectangles in red are turned on in _draw_line() in order to show the incorrect wrapped line above the text that appears when the control is shrunk in width.

The Update Image button calls update_image and reduces the width by 1% (an arbitrary number), which causes the wrapped lines to be correctly recalculated. Any parameter change with update_image causes the same result.

The correct behavior would be for the wrapping to remain unchanged regardless of width, and for the extra line above the text not to appear.

RTL_percent_image_resize_bug.mov

Steps to reproduce

See MRP below.

Minimal reproduction project

RTL_percent_image_resize_bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants