mirror of
https://github.com/godotengine/godot.git
synced 2025-02-04 18:03:40 +00:00
Merge pull request #37397 from Eoin-ONeill-Yokai/Bug37081
Correction to RichTextLabel Tabulation (Bug 37081)
This commit is contained in:
commit
de1d021574
@ -582,13 +582,14 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
|
|||||||
} else {
|
} else {
|
||||||
cw = drawer.draw_char(ci, p_ofs + Point2(align_ofs + pofs, y + lh - line_descent) + fx_offset, fx_char, c[i + 1], fx_color);
|
cw = drawer.draw_char(ci, p_ofs + Point2(align_ofs + pofs, y + lh - line_descent) + fx_offset, fx_char, c[i + 1], fx_color);
|
||||||
}
|
}
|
||||||
} else if (previously_visible) {
|
} else if (previously_visible && c[i] != '\t') {
|
||||||
backtrack += font->get_char_size(fx_char, c[i + 1]).x;
|
backtrack += font->get_char_size(fx_char, c[i + 1]).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
p_char_count++;
|
p_char_count++;
|
||||||
if (c[i] == '\t') {
|
if (c[i] == '\t') {
|
||||||
cw = tab_size * font->get_char_size(' ').width;
|
cw = tab_size * font->get_char_size(' ').width;
|
||||||
|
backtrack = MAX(0, backtrack - cw);
|
||||||
}
|
}
|
||||||
|
|
||||||
ofs += cw;
|
ofs += cw;
|
||||||
|
Loading…
Reference in New Issue
Block a user