From b9730a695643af15bd97f9b87ae656b735281bba Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 10 Aug 2018 13:15:26 -0300 Subject: [PATCH] Make line edit always vertically aligned, makes no sense otherwise. Fixes #17188 --- scene/gui/line_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 4d73ee2d5666..6258f32bf377 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -642,7 +642,7 @@ void LineEdit::_notification(int p_what) { int char_ofs = window_pos; int y_area = height - style->get_minimum_size().height; - int y_ofs = style->get_offset().y; + int y_ofs = style->get_offset().y + (y_area - font->get_height()) / 2; int font_ascent = font->get_ascent();