mirror of https://github.com/OpenTTD/OpenTTD
Fix: Don't draw truncation ellipsis if it's too wide. (#14401)
parent
80d2194511
commit
42a9d27fd9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue