You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Fixed center align in LineEdit
This commit is contained in:
@@ -601,6 +601,9 @@ void LineEdit::_notification(int p_what) {
|
||||
} break;
|
||||
case ALIGN_CENTER: {
|
||||
|
||||
if (window_pos != 0)
|
||||
x_ofs = style->get_offset().x;
|
||||
else
|
||||
x_ofs = int(size.width - (cached_width)) / 2;
|
||||
} break;
|
||||
case ALIGN_RIGHT: {
|
||||
@@ -846,6 +849,9 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) {
|
||||
} break;
|
||||
case ALIGN_CENTER: {
|
||||
|
||||
if (window_pos != 0)
|
||||
pixel_ofs = int(style->get_offset().x);
|
||||
else
|
||||
pixel_ofs = int(size.width - (cached_width)) / 2;
|
||||
} break;
|
||||
case ALIGN_RIGHT: {
|
||||
|
||||
Reference in New Issue
Block a user