summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-22 10:45:49 +0200
committerGitHub <noreply@github.com>2019-04-22 10:45:49 +0200
commit0fc67767a453825114821638657afe34009d3dcc (patch)
treeacb4167057523d332f3fccf241fe97a23b8c9f4d
parent33b69340ad262c4628da58edd61a3211497be911 (diff)
parentac1c52398965fb106075de325f984884932abf9c (diff)
Merge pull request #28276 from YeldhamDev/lineedit_offset_limit
Fix 'LineEdit' offset limit not accounting for the right/clear icon width
-rw-r--r--scene/gui/line_edit.cpp2
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();