1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Exclude \n when splitting Galleys (#7316)

* Follow up to #7146 

Previously when galleys were splitted, each exept the last had an extra
empty row that had to be removed when they were concated. This changes
it to remove the `\n` from the layout jobs when splitting.
This commit is contained in:
Lucas Meurer
2025-07-09 14:53:19 +02:00
committed by GitHub
parent a7f14ca176
commit 207e71c2ae
4 changed files with 146 additions and 60 deletions

View File

@@ -84,7 +84,7 @@ impl<'a> AtomKind<'a> {
let wrap_mode = wrap_mode.unwrap_or(ui.wrap_mode());
let galley =
text.into_galley(ui, Some(wrap_mode), available_size.x, TextStyle::Button);
(galley.intrinsic_size, SizedAtomKind::Text(galley))
(galley.intrinsic_size(), SizedAtomKind::Text(galley))
}
AtomKind::Image(image) => {
let size = image.load_and_calc_size(ui, available_size);