Fix word wrapping inside VJoins

This commit is contained in:
Joscha 2022-08-01 19:13:47 +02:00
parent 2d1c953250
commit 5c9c6e9d98
2 changed files with 2 additions and 2 deletions

View file

@ -279,7 +279,7 @@ impl Widget for Editor {
let min_width = lines let min_width = lines
.iter() .iter()
.map(|l| frame.width(l.text())) .map(|l| frame.width(l.text().trim_end()))
.max() .max()
.unwrap_or(0) .unwrap_or(0)
+ 1; + 1;

View file

@ -40,7 +40,7 @@ impl Widget for Text {
let lines = self.wrapped(frame, max_width); let lines = self.wrapped(frame, max_width);
let min_width = lines let min_width = lines
.iter() .iter()
.map(|l| frame.width(l.text())) .map(|l| frame.width(l.text().trim_end()))
.max() .max()
.unwrap_or(0); .unwrap_or(0);
let min_height = lines.len(); let min_height = lines.len();