bevy/examples/ui
Rob Parrett 5d941d5b91
Remove custom window size from flex_layout example (#11876)
# Objective

The example showcase doesn't seem to work well with the portrait aspect
ratio used in this example, which is possibly something to be fixed
there, but there's also no reason this *needs* a custom size.

This custom window size is also sightly too tall for my particular
display which is a very common display size when accounting for the
macOS task bar and window title, so the content at the bottom is
clipped.

## Solution

- Remove the custom window size
- Swap the order of the justify / align nested loops so that the content
fits the new aspect ratio
- Make the containers responsive to window size, and make all the gaps
even

## Before

<img width="870" alt="Screenshot 2024-02-15 at 10 56 11 AM"
src="https://github.com/bevyengine/bevy/assets/200550/803217dd-e311-4f9e-aabf-2656f7f67615">

## After

<img width="1280" alt="Screenshot 2024-02-15 at 10 56 25 AM"
src="https://github.com/bevyengine/bevy/assets/200550/bf1e4920-f053-4d42-ab0b-3efea6835cae">

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-02-26 16:04:02 +00:00
..
borders.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
button.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
display_and_visibility.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
flex_layout.rs Remove custom window size from flex_layout example (#11876) 2024-02-26 16:04:02 +00:00
font_atlas_debug.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
grid.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
overflow.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
overflow_debug.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
relative_cursor_position.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
render_ui_to_texture.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
size_constraints.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
text.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
text_debug.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
text_wrap_debug.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
transparency_ui.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
ui.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
ui_material.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
ui_scaling.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
ui_texture_atlas.rs Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
ui_texture_slice.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
viewport_debug.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
window_fallthrough.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00
z_index.rs Rename bevy_render::Color to LegacyColor (#12069) 2024-02-24 21:35:32 +00:00