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 font lost parentAlpha in HighlightTextArea #341

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

fgnm
Copy link
Contributor

@fgnm fgnm commented Sep 16, 2020

In HighlightTextArea font color is overwritten by chunk color. This color doesn't know anything about parent alpha and thus all the work done here in VisTextField is useless.
This commit saves original parent alpha value and restore it after chunk color set.

This fix prevent some ugly animations when HighlightTextArea is placed for example in a Dialog that fades in and out.

You can test with TestHighlightTextArea too, just change the alpha of the window.

Thanks

@fgnm
Copy link
Contributor Author

fgnm commented Sep 20, 2020

I've added another commit because I forgot that chunk color might have its own alpha, so this should be preserved as well

@kotcrab
Copy link
Owner

kotcrab commented Sep 22, 2020

Good catch, thanks.

@kotcrab kotcrab merged commit de497ce into kotcrab:master Sep 22, 2020
@fgnm fgnm deleted the font-highlight-fix branch November 1, 2020 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants