Fix RTL min/max line width calculation.

(cherry picked from commit 33b26e5cdc)
This commit is contained in:
bruvzg 2021-11-29 15:36:42 +02:00 committed by Rémi Verschelde
parent 97404dc612
commit 552feba40b
No known key found for this signature in database
GPG Key ID: C3336907360768E1
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) \ #define ENSURE_WIDTH(m_width) \
if (p_mode == PROCESS_CACHE) { \ if (p_mode == PROCESS_CACHE) { \
l.maximum_width = MAX(l.maximum_width, MIN(p_width, wofs + m_width)); \ l.maximum_width = MAX(l.maximum_width, MIN(p_width, Math::ceil(wofs + m_width))); \
l.minimum_width = MAX(l.minimum_width, m_width); \ l.minimum_width = MAX(l.minimum_width, Math::ceil(m_width)); \
} \ } \
if (wofs - backtrack + m_width > p_width) { \ if (wofs - backtrack + m_width > p_width) { \
line_wrapped = true; \ line_wrapped = true; \