bevy/examples/ui
Nico Burns 919919c998
Fix text measurement algorithm (#8425)
# Objective

Followup to #7779 which tweaks the actual text measurement algorithm to
be more robust.

Before:

<img width="822" alt="Screenshot 2023-04-17 at 18 12 05"
src="https://user-images.githubusercontent.com/1007307/232566858-3d3f0fd5-f3d4-400a-8371-3c2a3f541e56.png">

After:

<img width="810" alt="Screenshot 2023-04-17 at 18 41 40"
src="https://user-images.githubusercontent.com/1007307/232566919-4254cbfa-1cc3-4ea7-91ed-8ca1b759bacf.png">

(note extra space taken up in header in before example)

## Solution

- Text layout of horizontal text (currently the only kind of text we
support) is now based solely on the layout constraints in the horizontal
axis. It ignores constraints in the vertical axis and computes vertical
size based on wrapping subject to the horizontal axis constraints.
- I've also added a paragraph to the `grid` example for testing / demo
purposes.
2023-04-17 19:59:42 +00:00
..
button.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
flex_layout.rs Rename text_layout example to flex_layout (#7943) 2023-03-22 08:22:56 +00:00
font_atlas_debug.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
grid.rs Fix text measurement algorithm (#8425) 2023-04-17 19:59:42 +00:00
overflow_debug.rs Add overflow_debug example (#8198) 2023-04-05 23:07:41 +00:00
relative_cursor_position.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
text.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
text_debug.rs Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00
transparency_ui.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
ui.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
ui_scaling.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
window_fallthrough.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
z_index.rs Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00