Skip to content
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

Make LineEdit scrolling show as much text as possible #86732

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

TheSofox
Copy link
Contributor

@TheSofox TheSofox commented Jan 3, 2024

Fixes #27420
Bugsquad edit: Fixes #27421

This PR makes sure the scrolling in LineEdit shows as much text as possible, such as when you delete text after entering more than the textbox can fit. Previously, it wouldn't update the scrolling on deleting text, now it does. See linked issue for video examples.

@TheSofox
Copy link
Contributor Author

TheSofox commented Jan 3, 2024

Apparently my PR also fixes #27421. Quick test seems to indicate "Center" and "Right" alignment behave much better with this change.

Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with all align modes, works nicely. I can confirm that this fixes #27421 and most of #27420. (the "jumping" cursor is still present, but fixing that would require implementing clipping which is should be a toggleable feature IMO and is definitely out of scope here)

Although not absolutely necessary, you could add a comment describing what the code snippet does/for what it is needed since it's not that obvious (as part of the ongoing effort to make the code base more maintainable).

@TheSofox TheSofox force-pushed the line-edit-delete-fix branch from 6e1a77b to 8661667 Compare January 4, 2024 04:13
@TheSofox
Copy link
Contributor Author

TheSofox commented Jan 4, 2024

Amended commit with additional comment. Thanks for the review and approval.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 4, 2024
@akien-mga akien-mga merged commit 50a073c into godotengine:master Jan 4, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants