diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-09 22:05:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-09 22:05:41 -0300 |
commit | 8266cf46b5f680f4382318d1f95c8ca935d2c5a2 (patch) | |
tree | 6f91de6d9644e913c89b39d9cbd676f73592cb66 /scene/gui | |
parent | f4ff30dff0468880c6b36c347e83ebacb9db2d5e (diff) |
Reverted a PR i don't understand how to find but fixes #5097
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/line_edit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 44cc798447..2a4e82a8e7 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -454,7 +454,7 @@ void LineEdit::_notification(int p_what) { } break; } - int ofs_max=width-style->get_minimum_size().width+x_ofs; + int ofs_max=width-style->get_minimum_size().width; int char_ofs=window_pos; int y_area=height-style->get_minimum_size().height; @@ -799,8 +799,8 @@ Size2 LineEdit::get_minimum_size() const { Ref<Font> font=get_font("font"); Size2 min=style->get_minimum_size(); - min+=font->get_string_size(this->text); - + min.height+=font->get_height(); + min.width+=get_constant("minimum_spaces")*font->get_char_size(' ').x; return min; } |