Skip to content

Changing the color of a TextSection triggers a redraw of the full Text #6967

@ickshonpe

Description

@ickshonpe

Bevy version

0.9.1

What went wrong

Changing the Color of a TextSection trips change detection causing the entire Text to be needlessly recomputed.

Additional information

Workaround:

text_query.for_each_mut(|mut text| {
  text.bypass_change_detection().text.sections[0].style.color = new_color;
});

related: #6956, #5935

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TextRendering and layout for charactersA-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile times

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions