Merge pull request #46088 from groud/fix_line_edit

Fix minimum_character_width in LineEdit
This commit is contained in:
Rémi Verschelde 2021-02-16 11:11:03 +01:00 committed by GitHub
commit ba8b95a2a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1587,7 +1587,7 @@ Size2 LineEdit::get_minimum_size() const {
// Minimum size of text.
int em_space_size = font->get_char_size('M', 0, font_size).x;
min_size.width = get_theme_constant("minimum_character_width'") * em_space_size;
min_size.width = get_theme_constant("minimum_character_width") * em_space_size;
if (expand_to_text_length) {
// Add a space because some fonts are too exact, and because cursor needs a bit more when at the end.