-
Notifications
You must be signed in to change notification settings - Fork 712
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
RichEditBox dont match Theme #3061
Comments
I am not sure if this is actually a bug. Per default text is black, so on black background you don't see anything. Similarly, if you load a file with white text into a RichEditBox in light theme, you can't read the text either. |
Yeah, I think this is by design. With RichEdit, the text color is associated with the text itself so when you copy black text into a text box its supposed to be black. The background is also black though so you get this behavior. We could have xaml controls gallery be responsive to this scenario but I'm not sure that is worth it. @stmoy |
The bug reported here doesn't repro on other RichEditBoxes - just this specific one that attempts to emulate a text editor (and specifically sets the text color to black). I think it'd be reasonable to move this over to the XCG repo. @chingucoding did you add this sample? Maybe instead of setting the color to black, it could be set to a ThemeBrush instead? -=-=-=-=- |
There are two things here:
Regarding 1, I don't think there is much to do beside overriding the font color delivered to us through the rtf file, @stmoy do you think we should do that kind of changes when loading an rtf file? |
For (1), I don't think we should do any sort of shenanigans to the copied text in the sample. I think the absolute easiest thing would be to change the background color back to white just for this sample. |
I think you would still hit this issue when loading an rtf file with white text. Maybe that is a little less common though? |
True, and probably. This isn't mean to be a proper editor, just a simulacrum of one. It's ok if the edge cases don't work. |
If we change the background, we also need to adjust the foreground, foregroundhover, foregroundfocused ... values. I am not sure if we want to go down that road, especially as it suggest that you should use the RichEditBox with changed background and foreground values. |
With this change, can we close this issue? microsoft/WinUI-Gallery#524 |
Closing per the above PR |
Describe the bug
If you load a text to a RichEditBox when the Theme is in Dark mode the text will be black.
Steps to reproduce the bug
Expected behavior
The text should be white.
The text was updated successfully, but these errors were encountered: