egui/crates
Juan Campa c630a8de89
Fix incorrect line breaks (#4377)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

While breaking a paragraph, it was possible to lose line break
candidates that could've been used on the next line, causing egui to
unnecessarily overrun `wrap.max_width`.

This PR fixes it so that we don't forget about those candidates.


Before:
Note that the window can't resize to the requested width because the
text is not wrapping.


https://github.com/emilk/egui/assets/1410520/6430a334-2995-4b40-bc34-8f01923f9f95

After:


https://github.com/emilk/egui/assets/1410520/225fa4cd-cbbb-4a7e-9580-7f1814c05ee7

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-04-21 10:58:40 +02:00
..
ecolor Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
eframe Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui Consider layer transform when positioning text agent (#4319) 2024-04-05 07:31:33 +02:00
egui-wgpu Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui-winit Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui_demo_app Rename "Color test" to "Rendering test", and restructure it slightly (#4298) 2024-04-01 13:08:52 +02:00
egui_demo_lib Rename "Color test" to "Rendering test", and restructure it slightly (#4298) 2024-04-01 13:08:52 +02:00
egui_extras Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui_glow Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui_plot Release 0.27.2 - Fix blurry web rendering 2024-04-02 18:18:43 +02:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Add some tests for `Rect` 2024-03-26 11:13:04 +01:00
epaint Fix incorrect line breaks (#4377) 2024-04-21 10:58:40 +02:00