diff options
author | kbake <kbake@outlook.com> | 2017-11-17 02:22:20 -0500 |
---|---|---|
committer | kbake <kbake@outlook.com> | 2017-11-18 18:57:48 -0500 |
commit | a5973f4071128e5f7094120eb40cab2388c82069 (patch) | |
tree | da2ca48aeabc859cd56d071b26475a42dbb988c3 /scene/gui | |
parent | 63283eca5542314ea5b71afa1fe39bd48c202a4d (diff) |
change expand_to_len property to add on nonzero...also rename to
expand_to_text_length and shift window on expand to see all text
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/line_edit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 5d3e5ec0e8..f7bf1cd9ea 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1309,6 +1309,7 @@ void LineEdit::set_expand_to_text_length(bool p_enabled) { expand_to_text_length = p_enabled; minimum_size_changed(); + set_window_pos(0); } bool LineEdit::get_expand_to_text_length() const { @@ -1428,7 +1429,7 @@ void LineEdit::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "max_length"), "set_max_length", "get_max_length"); ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "editable"), "set_editable", "is_editable"); ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "secret"), "set_secret", "is_secret"); - ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "expand_to_len"), "set_expand_to_text_length", "get_expand_to_text_length"); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand_to_text_length"), "set_expand_to_text_length", "get_expand_to_text_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_focus_mode", "get_focus_mode"); ADD_GROUP("Placeholder", "placeholder_"); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "placeholder_text"), "set_placeholder", "get_placeholder"); |