Support configurable LineHeight in text widgets

This commit is contained in:
Héctor Ramón Jiménez 2023-05-04 13:00:16 +02:00
parent 8e8808f0e1
commit 9499a8f9e6
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
24 changed files with 337 additions and 42 deletions

View file

@ -62,6 +62,7 @@ impl<'a> Layer<'a> {
),
color: Color::new(0.9, 0.9, 0.9, 1.0),
size: 20.0,
line_height: core::text::LineHeight::Relative(1.2),
font: Font::MONOSPACE,
horizontal_alignment: alignment::Horizontal::Left,
vertical_alignment: alignment::Vertical::Top,
@ -114,6 +115,7 @@ impl<'a> Layer<'a> {
content,
bounds,
size,
line_height,
color,
font,
horizontal_alignment,
@ -126,6 +128,7 @@ impl<'a> Layer<'a> {
content,
bounds: *bounds + translation,
size: *size,
line_height: *line_height,
color: *color,
font: *font,
horizontal_alignment: *horizontal_alignment,