-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Refactor Node fields (previously Style) #10497
Copy link
Copy link
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Description
What problem does this solve or what need does it fill?
Bevy uses the word "Style" to represent a set of styles that can be applied to a NodeBundle. Unfortunately, the name is rather broad, which causes problems for a number of reasons:
- Not all style properties are represented in Style, so the name is misleading.
- Style only applies to NodeBundles, not other kinds of entities (such as Text) which might also need styles.
- Many UI frameworks which want to define a more comprehensive, all-encompassing "style" structure are forced to pick a different name, despite the fact that the word "Style" is a natural fit for such a struct. (Yes, you can use namespace qualification, but that leads to a different kind of ugliness).
What solution would you like?
I propose renaming "Style" to something more specific such as "NodeStyle". We can keep a type alias "Style" for backwards compatibility.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use