summaryrefslogtreecommitdiffstats
path: root/scene/gui/line_edit.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-02-12 14:31:58 +0100
committerGitHub <noreply@github.com>2021-02-12 14:31:58 +0100
commit5e528f35505ba946cbda5f7c1fc800ed578b52dc (patch)
treec695db6096263abbef6841954ccf2f0a8befdb2f /scene/gui/line_edit.cpp
parentbc552384088c4ad4e10643d5be4b8e600daa0ce9 (diff)
parent6c9e608a34de033ab345fd11b5ee720337af2190 (diff)
downloadredot-engine-5e528f35505ba946cbda5f7c1fc800ed578b52dc.tar.gz
Merge pull request #45922 from bruvzg/space_width
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) {