summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-10 10:13:22 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-02-12 19:55:52 +0200
commit29199579f780f4f66350e1962926c08b2ddcf65b (patch)
tree4e722851ab0cdd71401e87c4b34c92d1c2630324 /scene/gui/text_edit.cpp
parentd3a6b6daaab4c8dfb7bdf35cc2fe2145ae6c22a1 (diff)
Add sub-pixel glyph positioning support.
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 5295acce8f..d40f715ae7 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -961,7 +961,7 @@ void TextEdit::_notification(int p_what) {
// Give visual indication of empty selected line.
if (selection.active && line >= selection.from_line && line <= selection.to_line && char_margin >= xmargin_beg) {
- int char_w = font->get_char_size(' ', 0, font_size).width;
+ float char_w = font->get_char_size(' ', 0, font_size).width;
if (rtl) {
RenderingServer::get_singleton()->canvas_item_add_rect(ci, Rect2(size.width - xmargin_beg - ofs_x - char_w, ofs_y, char_w, row_height), selection_color);
} else {