summaryrefslogtreecommitdiffstats
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-02-12 15:06:39 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-02-12 15:06:50 +0200
commit6c9e608a34de033ab345fd11b5ee720337af2190 (patch)
treec695db6096263abbef6841954ccf2f0a8befdb2f /scene/gui/line_edit.cpp
parentbc552384088c4ad4e10643d5be4b8e600daa0ce9 (diff)
downloadredot-engine-6c9e608a34de033ab345fd11b5ee720337af2190.tar.gz
Use get_char_size(' ') to calculate space width.
Diffstat (limited to 'scene/gui/line_edit.cpp')
-rw-r--r--scene/gui/line_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index bbe09af3aa..14c84eb256 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1568,7 +1568,7 @@ Size2 LineEdit::get_minimum_size() const {
Size2 min_size;
// Minimum size of text.
- int space_size = font->get_char_size('m', 0, font_size).x;
+ int space_size = font->get_char_size(' ', 0, font_size).x;
min_size.width = get_theme_constant("minimum_spaces") * space_size;
if (expand_to_text_length) {