Parcourir la source

Make line edit always vertically aligned, makes no sense otherwise. Fixes #17188

Juan Linietsky il y a 7 ans
Parent
commit
b9730a6956
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      scene/gui/line_edit.cpp

+ 1 - 1
scene/gui/line_edit.cpp

@@ -642,7 +642,7 @@ void LineEdit::_notification(int p_what) {
 			int char_ofs = window_pos;
 			int char_ofs = window_pos;
 
 
 			int y_area = height - style->get_minimum_size().height;
 			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();
 			int font_ascent = font->get_ascent();