Fix incorrect X position of line length guideline
This commit is contained in:
parent
68081b3f6e
commit
94d542042e
1 changed files with 1 additions and 1 deletions
|
@ -683,7 +683,7 @@ void TextEdit::_notification(int p_what) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line_length_guideline) {
|
if (line_length_guideline) {
|
||||||
int x = xmargin_beg + cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs;
|
int x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs;
|
||||||
if (x > xmargin_beg && x < xmargin_end) {
|
if (x > xmargin_beg && x < xmargin_end) {
|
||||||
VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color);
|
VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue