1
0
Fork 0

Fix: Don't draw truncation ellipsis if it's too wide. (#14401)

pull/14403/head
Peter Nelson 2025-06-30 20:40:04 +01:00 committed by GitHub
parent 80d2194511
commit 42a9d27fd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -540,6 +540,9 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
dot_width = fc->GetGlyphWidth(dot_glyph);
dot_sprite = fc->GetGlyph(dot_glyph);
/* Is there enough space even for an ellipsis? */
if (max_w < dot_width * 3) return (_current_text_dir == TD_RTL) ? left : right;
if (_current_text_dir == TD_RTL) {
min_x += 3 * dot_width;
offset_x = w - max_w;