fix example grid (#8940)

`Style` flattened `size`, `min_size` and `max_size` to its root struct,
causing compilation errors.

I uncommented the code to avoid further silent error not caught by CI,
but hid the view to keep the same behaviour.
This commit is contained in:
Thierry Berger 2023-06-23 23:28:11 +02:00 committed by GitHub
parent 75c6641b41
commit 469a19c290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,34 +169,31 @@ fn spawn_layout(mut commands: Commands, asset_server: Res<AssetServer>) {
..default() ..default()
}); });
// Modal (absolutely positioned on top of content - uncomment to view) // Modal (absolutely positioned on top of content - currently hidden: to view it, change its visibility)
// builder.spawn(NodeBundle { builder.spawn(NodeBundle {
// style: Style { visibility: Visibility::Hidden,
// position_type: PositionType::Absolute, style: Style {
// margin: UiRect { position_type: PositionType::Absolute,
// top: Val::Px(100.), margin: UiRect {
// bottom: Val::Auto, top: Val::Px(100.),
// left: Val::Auto, bottom: Val::Auto,
// right: Val::Auto, left: Val::Auto,
// }, right: Val::Auto,
// size: Size { },
// width: Val::Percent(60.), width: Val::Percent(60.),
// height: Val::Px(300.), height: Val::Px(300.),
// }, max_width: Val::Px(600.),
// max_size: Size { max_height: Val::Auto,
// width: Val::Px(600.), ..default()
// height: Val::Auto, },
// }, background_color: BackgroundColor(Color::Rgba {
// ..default() red: 255.0,
// }, green: 255.0,
// background_color: BackgroundColor(Color::Rgba { blue: 255.0,
// red: 255.0, alpha: 0.8,
// green: 255.0, }),
// blue: 255.0, ..default()
// alpha: 0.8, });
// }),
// ..default()
// });
}); });
} }