Allow layout to be calculated without specifying width

This commit is contained in:
Jeremy Soller 2024-06-11 08:17:35 -06:00
parent a3a6262e5d
commit b288de13ae
4 changed files with 66 additions and 32 deletions

View file

@ -217,7 +217,7 @@ impl BufferLine {
&mut self,
font_system: &mut FontSystem,
font_size: f32,
width: f32,
width_opt: Option<f32>,
wrap: Wrap,
match_mono_width: Option<f32>,
tab_width: u16,
@ -226,7 +226,7 @@ impl BufferLine {
&mut ShapeBuffer::default(),
font_system,
font_size,
width,
width_opt,
wrap,
match_mono_width,
tab_width,
@ -239,7 +239,7 @@ impl BufferLine {
scratch: &mut ShapeBuffer,
font_system: &mut FontSystem,
font_size: f32,
width: f32,
width_opt: Option<f32>,
wrap: Wrap,
match_mono_width: Option<f32>,
tab_width: u16,
@ -251,7 +251,7 @@ impl BufferLine {
shape.layout_to_buffer(
scratch,
font_size,
width,
width_opt,
wrap,
align,
&mut layout,