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

Fix user selection on top of bgcolor areas in a RichTextLabel #100208

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

eviltrout
Copy link
Contributor

This Fixes #100072.

It seems that when rendering a RichTextLabel the selected text is rendered second last before the text itself. This causes the error illustrated in #100072 where selecting text can sometimes be rendered below the background color.

This fix moves the selection rendering to be after that, and the bug goes away as shown in this screenshot:

image

I can't think of a good reason to render the background color after the selection so I think this code is safe, but if someone more familiar with the RichTextLabel wants to chime in I'd appreciate it. cc @bruvzg since they touched this code most recently.

@eviltrout eviltrout requested a review from a team as a code owner December 9, 2024 16:45
@AThousandShips AThousandShips added bug topic:gui cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Dec 9, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Dec 9, 2024
@Repiteo Repiteo merged commit 66dd289 into godotengine:master Dec 11, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 11, 2024

Thanks! Congratulations on your first merged contribution! 🎉

@eviltrout
Copy link
Contributor Author

Thanks, feels awesome! I've reported a few bugs before but this is my first merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In a RichTextLabel, you can't see highlighted text when a background color wraps lines
4 participants