You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a RichTextLabel has BBCode enabled, and contains a table that ends on the last visible line, the table will overlap with the next line following it if not all cells are populated in the last row. Similar issue to #47012, but only happens on the last visible line.
Steps to reproduce
In a new project, add a RichTextLabel to the main scene, enable BBCode, and add the following text:
Top text
[table=3]
[cell]Cell[/cell]
[cell]Cell[/cell]
[cell]Cell[/cell]
[cell]Cell[/cell]
[cell]Cell[/cell]
[cell]Cell[/cell]
[cell]Cell[/cell]
[/table]
Bottom Text
Adjust RichTextLabel size and number of cells as needed to line up table with bottom of the RichTextLabel. Enabling "Fit Content" is an quick way to line up the size, but not required to see the issue.
Minimal reproduction project (MRP)
N/A, can be reproduced in a new project with the steps above
The text was updated successfully, but these errors were encountered:
When calculating table height, RichTextLabel::_shape_line would increase the height when it reached the end of a complete row, or the final cell of the table. RichTextLabel::_resize_line would only increase the height at the end of a complete row, causing the height to ignore the final row if not all cells were populated. This would cause the final row to overlap with the following line in the RichTextLabel if it was the last visible line in the RichTextLabel, as _resize_line is called when updating scrolling properties.
This change moves the common table size calculations to a separate function to reuse the code between _shape_line and _resize_line, keeping the final cell check that was used in _shape_line.
Fixesgodotengine#92603
2nafish117
pushed a commit
to 2nafish117/godot
that referenced
this issue
Aug 5, 2024
When calculating table height, RichTextLabel::_shape_line would increase the height when it reached the end of a complete row, or the final cell of the table. RichTextLabel::_resize_line would only increase the height at the end of a complete row, causing the height to ignore the final row if not all cells were populated. This would cause the final row to overlap with the following line in the RichTextLabel if it was the last visible line in the RichTextLabel, as _resize_line is called when updating scrolling properties.
This change moves the common table size calculations to a separate function to reuse the code between _shape_line and _resize_line, keeping the final cell check that was used in _shape_line.
Fixesgodotengine#92603
Tested versions
v4.3.beta.custom_build [705b7a0]
System information
Windows 10
Issue description
When a
RichTextLabel
has BBCode enabled, and contains a table that ends on the last visible line, the table will overlap with the next line following it if not all cells are populated in the last row. Similar issue to #47012, but only happens on the last visible line.Steps to reproduce
In a new project, add a
RichTextLabel
to the main scene, enable BBCode, and add the following text:Adjust
RichTextLabel
size and number of cells as needed to line up table with bottom of theRichTextLabel
. Enabling "Fit Content" is an quick way to line up the size, but not required to see the issue.Minimal reproduction project (MRP)
N/A, can be reproduced in a new project with the steps above
The text was updated successfully, but these errors were encountered: