summaryrefslogtreecommitdiff
path: root/scene/gui/code_edit.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-14 15:51:07 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-14 15:51:07 +0200
commit85424afee64233ed04a7c7b737b24631eeb6f7f8 (patch)
tree3ca3bb58a5a5fd9969d0ccd5f86f8b02a5429b0f /scene/gui/code_edit.cpp
parentf60c81af11357dd8f27deee55be109558aadda65 (diff)
Fix CodeEdit guidelines position.
Diffstat (limited to 'scene/gui/code_edit.cpp')
-rw-r--r--scene/gui/code_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 398b909195..040075150b 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -92,7 +92,7 @@ void CodeEdit::_notification(int p_what) {
if (line_length_guideline_columns.size() > 0) {
const int xmargin_beg = style_normal->get_margin(SIDE_LEFT) + get_total_gutter_width();
const int xmargin_end = size.width - style_normal->get_margin(SIDE_RIGHT) - (is_drawing_minimap() ? get_minimap_width() : 0);
- const int char_size = (int)font->get_char_size('0', 0, font_size).width;
+ const int char_size = Math::round(font->get_char_size('0', 0, font_size).width);
for (int i = 0; i < line_length_guideline_columns.size(); i++) {
const int xoffset = xmargin_beg + char_size * (int)line_length_guideline_columns[i] - get_h_scroll();