summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-10-04 16:12:52 +0200
committerGitHub <noreply@github.com>2021-10-04 16:12:52 +0200
commit865b62b1cddbb7989bc520eed2d8428c6923fee9 (patch)
tree5e021d90f23d64a161bec950593766d1b8aaa365 /scene/gui/text_edit.cpp
parent2a09e119864432b0074941eb7eba802c08faa72a (diff)
parentbdbb7b3999cddc821489d11350ad21bf89af5a42 (diff)
downloadredot-engine-865b62b1cddbb7989bc520eed2d8428c6923fee9.tar.gz
Merge pull request #53341 from pycbouh/gui-editor-scale-encapsulation
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index e2ddc761b8..875049ab4e 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -42,10 +42,6 @@
#include "scene/main/window.h"
-#ifdef TOOLS_ENABLED
-#include "editor/editor_scale.h"
-#endif
-
static bool _is_text_char(char32_t c) {
return !is_symbol(c);
}
@@ -1173,12 +1169,8 @@ void TextEdit::_notification(int p_what) {
}
}
- // Carets
-#ifdef TOOLS_ENABLED
- int caret_width = Math::round(EDSCALE);
-#else
- int caret_width = 1;
-#endif
+ // Carets.
+ int caret_width = Math::round(1 * get_theme_default_base_scale());
if (!clipped && caret.line == line && line_wrap_index == caret_wrap_index) {
caret.draw_pos.y = ofs_y + ldata->get_line_descent(line_wrap_index);