diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-04-21 13:55:40 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-04-21 13:55:40 -0300 |
commit | ac1c52398965fb106075de325f984884932abf9c (patch) | |
tree | 47b665e67b69e3503a1ceb4ced6619ec713e43b9 | |
parent | e292cc0a0a6e2d94bf2ec49e1a600159e0aca980 (diff) |
Fix 'LineEdit' offset limit not accounting for the right/clear icon width
Fully fixes #28242.
-rw-r--r-- | scene/gui/line_edit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index e83ef95db6..71ed5326a7 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -722,6 +722,8 @@ void LineEdit::_notification(int p_what) { } else { x_ofs = MAX(style->get_margin(MARGIN_LEFT), x_ofs - r_icon->get_width() - style->get_margin(MARGIN_RIGHT)); } + + ofs_max -= r_icon->get_width(); } int caret_height = font->get_height() > y_area ? y_area : font->get_height(); |