Merge pull request #28276 from YeldhamDev/lineedit_offset_limit

Fix 'LineEdit' offset limit not accounting for the right/clear icon width
This commit is contained in:
Rémi Verschelde 2019-04-22 10:45:49 +02:00 committed by GitHub
commit 0fc67767a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -722,6 +722,8 @@ void LineEdit::_notification(int p_what) {
} else { } else {
x_ofs = MAX(style->get_margin(MARGIN_LEFT), x_ofs - r_icon->get_width() - style->get_margin(MARGIN_RIGHT)); 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(); int caret_height = font->get_height() > y_area ? y_area : font->get_height();