-
Notifications
You must be signed in to change notification settings - Fork 28
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
Styles[0] is incorrect #133
Comments
Hi there, It appears that Styles[0] is not retaining the ForeColor property correctly, showing Color.Transparent instead of Color.Black right after setting it. This issue doesn't seem to affect Styles[3] and higher, which makes it even more peculiar. Given that the text is visible once selected, it suggests that the style is applied but not rendered correctly. You've mentioned that you observed Color.Transparent immediately after setting Color.Black. This indeed sounds like an unexpected behavior. Expected Behavior: If you checked the Scintilla.NET code and the Scintilla documentation without finding anything unusual about Style 0. Given that styles 32-39 are reserved, it’s curious that Style 0 behaves differently. Replication: I will try to replicate the issue on my end with both versions 5.5.1 and 5.6.0 to see if the behavior is consistent. Best regards, |
…rent colors via APIs that don't support alpha channel
Fix #133: Scintilla misbehaves when it receives transparent colors via APIs that don't support alpha channel
Describe the bug
I tried this in both 5.5.1 and 5.6.0.
Scintilla.Styles[0] returns inaccurate data. For example, the debugger showed that its ForeColor was Transparent when I had set it to Color.Black. The text appears correctly in the original Scintilla control, but when I copied the styles to another Scintilla control, the text was present but invisible (until I selected it).
This doesn't seem to be a problem with Styles[3] or higher (I'm not using indices 1 or 2, so I can't vouch for those.)
To Reproduce
Given an existing Scintilla control with styles configured, simply check the value of that.Styles[0]. In my case, I was using code like this spread across two different forms:
But I also checked and found that it returns Transparent immediately after being set to Black.
Expected behavior
Styles[0] should return the properties as they were when you set them.
Desktop (please complete the following information):
Additional context
I briefly checked the Scintilla.NET code and the Scintilla documentation, and nothing stuck out to me--style 0 isn't reserved, unlike 32-39. It might actually be a bug in Scintilla itself.
The text was updated successfully, but these errors were encountered: