Support max_width and text::Alignment for canvas::Text

This commit is contained in:
Héctor Ramón Jiménez 2025-04-30 04:19:15 +02:00
parent 6ebf386249
commit 97b4ed0d84
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
13 changed files with 139 additions and 127 deletions

View file

@ -179,9 +179,10 @@ fn scene<'a, Message: 'a>(n: usize) -> Element<'a, Message, Theme, Renderer> {
size: Pixels::from(16),
line_height: text::LineHeight::default(),
font: Font::DEFAULT,
align_x: alignment::Horizontal::Left,
align_x: text::Alignment::Left,
align_y: alignment::Vertical::Top,
shaping: text::Shaping::Basic,
max_width: f32::INFINITY,
});
}
})]