Fix LineEdit icon position in right-to-left layout#109363
Merged
Repiteo merged 1 commit intogodotengine:masterfrom Sep 16, 2025
Merged
Fix LineEdit icon position in right-to-left layout#109363Repiteo merged 1 commit intogodotengine:masterfrom
Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
f140eb9 to
fbf27db
Compare
bruvzg
approved these changes
Aug 19, 2025
Contributor
|
Thanks! |
Contributor
|
Cherry-picked to 4.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is made to move the icon (clear and custom) to the left side when layout direction is set to right-to-left (rtl), as mentioned here #109329 (comment).
Only Left and Right alignment is changed to work correctly with this new icon placement. For Center alignment it might be better to either wait for PR #109329 to get merged and update this PR after, or to come back and fix it in a follow up pr after both is merged.Should work for all alignments.Would need some help to test so things works as they should, thanks!
You can use this project to test with, use control (2) scene for rigth_to_left layout:
line-edit-center-align.zip
Stylebox problem
This is not part of this PR but this is probably good to change in the future.
The stylebox for the LineEdit is not correct when drawn for rtl layout if you have different left and right margins/borders.
Button is using "state"_mirrored styleboxes that users can setup to solve this. So either we need to add this for the LineEdit.
Or would it be possible to make styleboxes be able to be drawn flipped horizontally? To limit the number of styleboxes.