mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 14:40:19 +00:00
Document how Style
's size constraints interact (#7613)
# Objective Document how `Style`'s size constraints interact. # Changelog * Added extra doc comments to `Style`'s size fields.
This commit is contained in:
parent
9ef840e8e9
commit
16ce3859e3
1 changed files with 10 additions and 1 deletions
|
@ -249,11 +249,20 @@ pub struct Style {
|
|||
pub flex_shrink: f32,
|
||||
/// The initial size of the item
|
||||
pub flex_basis: Val,
|
||||
/// The size of the flexbox
|
||||
/// The ideal size of the flexbox
|
||||
///
|
||||
/// `size.width` is used when it is within the bounds defined by `min_size.width` and `max_size.width`.
|
||||
/// `size.height` is used when it is within the bounds defined by `min_size.height` and `max_size.height`.
|
||||
pub size: Size,
|
||||
/// The minimum size of the flexbox
|
||||
///
|
||||
/// `min_size.width` is used if it is greater than either `size.width` or `max_size.width`, or both.
|
||||
/// `min_size.height` is used if it is greater than either `size.height` or `max_size.height`, or both.
|
||||
pub min_size: Size,
|
||||
/// The maximum size of the flexbox
|
||||
///
|
||||
/// `max_size.width` is used if it is within the bounds defined by `min_size.width` and `size.width`.
|
||||
/// `max_size.height` is used if it is within the bounds defined by `min_size.height` and `size.height.
|
||||
pub max_size: Size,
|
||||
/// The aspect ratio of the flexbox
|
||||
pub aspect_ratio: Option<f32>,
|
||||
|
|
Loading…
Reference in a new issue