-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
What problem does this solve or what need does it fill?
In Bevy 0.15, Node
's properties like background_color
were converted into components, making them easy to override after node creation. However, properties like grid_auto_rows
are not components, making it harder to override them after spawning. This inconsistency increases boilerplate when passing all style properties to helper functions, especially if only a few need to be modified.
What solution would you like?
Make all style properties (like grid_auto_rows
, grid_row
, grid_column
) components, as background_color
is now. This would allow properties to be overridden after node creation.
What alternative(s) have you considered?
An alternative is to pass all style properties explicitly, even if they aren’t overridden, which leads to unnecessary verbosity. Another approach is modifying node styles directly after creation, but this adds extra steps.
Additional information
A similar thing happens with components that store more than one field like TextFont
. If you wish to override only the font size, you have to override the entire component, providing the font file again.