Fix RTL min/max line width calculation.

This commit is contained in:
bruvzg 2021-11-29 15:36:42 +02:00
parent 2f0bf70172
commit 33b26e5cdc
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
1 changed files with 2 additions and 2 deletions

View File

@ -271,8 +271,8 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
#define ENSURE_WIDTH(m_width) \
if (p_mode == PROCESS_CACHE) { \
l.maximum_width = MAX(l.maximum_width, MIN(p_width, wofs + m_width)); \
l.minimum_width = MAX(l.minimum_width, m_width); \
l.maximum_width = MAX(l.maximum_width, MIN(p_width, Math::ceil(wofs + m_width))); \
l.minimum_width = MAX(l.minimum_width, Math::ceil(m_width)); \
} \
if (wofs - backtrack + m_width > p_width) { \
line_wrapped = true; \