-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LineEdit bug when removing text with align=right/center #27421
Comments
Would this issue be stemming from line_edit.cpp? Or would it be coming from a more general file, like text_edit.cpp? |
@samH-FIT This comes from LineEdit, TextEdit doesn't have alignment. I'm assuming this is due to a wrong x offset in Line 681 in 9b69171
Edit: Noticed centered alignment has similar issues, the text isn't aligned properly until theres only 1 remaining character. |
I discovered that the bug comes from |
This isn't completetly fixed yet, as seen in the video below. https://drive.google.com/open?id=1Lw4bwEbsztbKUkn5h8hkB3f8nM1QqkOR As you can see, when removing text, there are still not enough characters drawn for center/right alignment. There are no more than 20 characters drawn at any point, even when it gets to the chars with a smaller width, which would allow for more characters drawn. Edit: Added project that I used. |
I can confirm the above case in a920f97 |
I still see this issue for right align and for place holder text centered in Godot 3.2.2-beta4 on Linux and Android. |
The issue from #27421 (comment) seems still reproducible in 3.4 RC 1. CC @bruvzg @timothyqiu who have also been working on text controls and alignment. |
@timothyqiu I have a seperate issue for that #27420 ^^ |
Godot version:
3.1-stable
Issue description:
When removing text from a LineEdit that has its alignment set to "Center" or "Right" and contains more text than can be shown, the caret starts acting weird. This gif shows it:
As you can see, the text is not being aligned properly and too few characters are drawn. With alignment set to "Center", it behaves like alignment set to "Left", then suddenly jumps back to the correct alignment when only one character remains.
Steps to reproduce:
Delete text from a full LineEdit with "Align" set to "Center" or "Right" by pressing backspace.
Edit:
This is also happening with align set to "Center", the offset is wrong until theres only one remaining character.
The text was updated successfully, but these errors were encountered: