-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix override_text_color
priority
#7439
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
Conversation
The override_text_color is now used when rendering text from a String or &str. This is consistent with the RichText variant and makes the option behave as advertised, taking precedence over WidgetVisuals and overriding the color for all text unless explicitly changed for a single widget (via RichText or LayoutJob).
For the record, here is where egui/crates/egui/src/widget_text.rs Lines 465 to 475 in 6fae65a
egui/crates/egui/src/widget_text.rs Line 382 in 6fae65a
egui/crates/egui/src/widget_text.rs Line 404 in 6fae65a
|
Preview available at https://egui-pr-preview.github.io/pr/7439-override-text-color-priority |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It would be great if you could add a simple snapshot test for this, e.g. in crates/egui_kittest/tests/regression_tests.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - thank you! ❤️
override_text_color
priority
The override_text_color is now used when rendering text from a String or &str. This is consistent with the RichText variant and makes the option behave as advertised, taking precedence over WidgetVisuals and overriding the color for all text unless explicitly changed for a single widget (via RichText or LayoutJob). * Closes <#7367> * [x] I have followed the instructions in the PR template --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
The override_text_color is now used when rendering text from a String or &str. This is consistent with the RichText variant and makes the option behave as advertised, taking precedence over WidgetVisuals and overriding the color for all text unless explicitly changed for a single widget (via RichText or LayoutJob).
override_text_color
in 0.32.0 #7367